Methods Summary |
---|
private void | addExistingDatasources()Add datasources already in existance before we called addListener.
Faster than allowing addListener to call us one datasource at a time.
if (manager == null || tv.isDisposed()) {
return;
}
Object[] dataSources = manager.getCurrentPieces();
if (dataSources == null || dataSources.length == 0)
return;
tv.addDataSources(dataSources);
tv.processDataSourceQueue();
|
public org.gudy.azureus2.core3.download.DownloadManager | getManager()
return manager;
|
public void | peerAdded(org.gudy.azureus2.core3.peer.PEPeer peer)
|
public void | peerManagerAdded(org.gudy.azureus2.core3.peer.PEPeerManager manager)
|
public void | peerManagerRemoved(org.gudy.azureus2.core3.peer.PEPeerManager manager)
tv.removeAllTableRows();
|
public void | peerManagerWillBeAdded(org.gudy.azureus2.core3.peer.PEPeerManager peer_manager)
|
public void | peerRemoved(org.gudy.azureus2.core3.peer.PEPeer peer)
|
public void | pieceAdded(org.gudy.azureus2.core3.peer.PEPiece created)
tv.addDataSource(created);
|
public void | pieceRemoved(org.gudy.azureus2.core3.peer.PEPiece removed)
tv.removeDataSource(removed);
|
public void | tableDataSourceChanged(java.lang.Object newDataSource)
if (manager != null)
manager.removePeerListener(this);
if (newDataSource == null)
manager = null;
else if (newDataSource instanceof Object[])
manager = (DownloadManager)((Object[])newDataSource)[0];
else
manager = (DownloadManager)newDataSource;
if (manager != null) {
manager.addPeerListener(this, false);
addExistingDatasources();
}
if (pieceInfoView != null) {
pieceInfoView.dataSourceChanged(manager);
}
if (pieceDistView != null) {
pieceDistView.dataSourceChanged(manager);
}
|
public void | tableViewDestroyed()
if (legendComposite != null && legendComposite.isDisposed()) {
legendComposite.dispose();
}
if (manager != null) {
manager.removePeerListener(this);
}
|
public void | tableViewInitialized()
if (legendComposite != null && (tv instanceof TableViewSWT)) {
Composite composite = ((TableViewSWT) tv).getTableComposite();
legendComposite = Legend.createLegendComposite(composite,
BlocksItem.colors, new String[] {
"PiecesView.legend.requested",
"PiecesView.legend.written",
"PiecesView.legend.downloaded",
"PiecesView.legend.incache"
});
}
if (manager != null) {
manager.removePeerListener(this);
manager.addPeerListener(this, false);
addExistingDatasources();
}
|