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 (g_manager == null || tv.isDisposed()) {
return;
}
ArrayList sources = new ArrayList();
Iterator itr = g_manager.getDownloadManagers().iterator();
while (itr.hasNext()) {
Object[] peers = ((DownloadManager)itr.next()).getCurrentPeers();
if (peers != null) {
sources.addAll(Arrays.asList(peers));
}
}
if (sources.isEmpty()) {
return;
}
tv.addDataSources(sources.toArray());
tv.processDataSourceQueue();
|
public void | addThisColumnSubMenu(java.lang.String columnName, Menu menuThisColumn)
|
public void | destroyInitiated()
|
public void | destroyed()
|
public void | downloadManagerAdded(org.gudy.azureus2.core3.download.DownloadManager dm)
dm.addPeerListener(this, !this.active_listener);
|
public void | downloadManagerRemoved(org.gudy.azureus2.core3.download.DownloadManager dm)
dm.removePeerListener(this);
|
public void | fillMenu(Menu menu)
PeersView.fillMenu(menu, tv, shell, false);
|
public void | peerAdded(org.gudy.azureus2.core3.peer.PEPeer created)
tv.addDataSource(created);
|
public void | peerManagerAdded(org.gudy.azureus2.core3.peer.PEPeerManager manager)
|
public void | peerManagerRemoved(org.gudy.azureus2.core3.peer.PEPeerManager manager)
|
public void | peerManagerWillBeAdded(org.gudy.azureus2.core3.peer.PEPeerManager peer_manager)
|
public void | peerRemoved(org.gudy.azureus2.core3.peer.PEPeer removed)
tv.removeDataSource(removed);
|
public void | pieceAdded(org.gudy.azureus2.core3.peer.PEPiece piece)
|
public void | pieceRemoved(org.gudy.azureus2.core3.peer.PEPiece piece)
|
private void | registerGlobalManagerListener()
this.active_listener = false;
try {g_manager.addListener(this);}
finally {this.active_listener = true;}
addExistingDatasources();
|
public void | seedingStatusChanged(boolean seeding_only_mode)
|
public void | tableViewDestroyed()
unregisterListeners();
|
public void | tableViewInitialized()
if (tv instanceof TableViewSWT) {
shell = ((TableViewSWT)tv).getComposite().getShell();
} else {
shell = Utils.findAnyShell();
}
registerGlobalManagerListener();
|
private void | unregisterListeners()
if (this.g_manager == null) {return;}
this.g_manager.removeListener(this);
Iterator itr = g_manager.getDownloadManagers().iterator();
while(itr.hasNext()) {
DownloadManager dm = (DownloadManager)itr.next();
downloadManagerRemoved(dm);
}
|