org.gudy.azureus2.ui.swt.views
Class PiecesView

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.views.table.impl.TableViewTab<PEPiece>
      extended by org.gudy.azureus2.ui.swt.views.PiecesView
All Implemented Interfaces:
TableDataSourceChangedListener, TableLifeCycleListener, DownloadManagerPeerListener, DownloadManagerPieceListener, AEDiagnosticsEvidenceGenerator, ObfusticateImage, UISWTViewEventListener, UISWTViewCoreEventListener, UISWTViewCoreEventListenerEx, TableViewSWTMenuFillListener

public class PiecesView
extends TableViewTab<PEPiece>
implements DownloadManagerPeerListener, DownloadManagerPieceListener, TableDataSourceChangedListener, TableLifeCycleListener, TableViewSWTMenuFillListener, UISWTViewCoreEventListenerEx

Author:
Olivier, TuxPaper 2004/Apr/20: Remove need for tableItemToObject 2004/Apr/21: extends TableView instead of IAbstractView, MjrTom 2005/Oct/08: Add PriorityItem, SpeedItem

Field Summary
static java.lang.String MSGID_PREFIX
           
 
Fields inherited from interface com.aelitis.azureus.ui.common.table.TableLifeCycleListener
EVENT_DESTROYED, EVENT_INITIALIZED
 
Constructor Summary
PiecesView()
          Initialize
 
Method Summary
 void addThisColumnSubMenu(java.lang.String sColumnName, org.eclipse.swt.widgets.Menu menuThisColumn)
          Create a SubMenu for column specific tasks.
 boolean eventOccurred(UISWTViewEvent event)
          Triggers when an even listed in UISWTViewEvent occurs
 void fillMenu(java.lang.String sColumnName, org.eclipse.swt.widgets.Menu menu)
           
 UISWTViewCoreEventListener getClone()
           
 DownloadManager getManager()
           
 TableViewSWT<PEPiece> initYourTableView()
           
 boolean isCloneable()
           
 void peerAdded(PEPeer peer)
           
 void peerManagerAdded(PEPeerManager manager)
           
 void peerManagerRemoved(PEPeerManager manager)
           
 void peerManagerWillBeAdded(PEPeerManager peer_manager)
          Called when a peer manager is created but not yet started
 void peerRemoved(PEPeer peer)
           
 void pieceAdded(PEPiece created)
           
 void pieceRemoved(PEPiece removed)
           
 void tableDataSourceChanged(java.lang.Object newDataSource)
           
 void tableViewDestroyed()
           
 void tableViewInitialized()
           
 
Methods inherited from class org.gudy.azureus2.ui.swt.views.table.impl.TableViewTab
dataSourceChanged, delete, enableFilterCheck, generate, getComposite, getFullTitle, getPrivateMenu, getPropertiesPrefix, getSWTView, getTableView, initComposite, initialize, obfusticatedImage, refresh, tableViewTabInitComplete, updateLanguage, viewActivated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSGID_PREFIX

public static final java.lang.String MSGID_PREFIX
See Also:
Constant Field Values
Constructor Detail

PiecesView

public PiecesView()
Initialize

Method Detail

isCloneable

public boolean isCloneable()
Specified by:
isCloneable in interface UISWTViewCoreEventListenerEx

getClone

public UISWTViewCoreEventListener getClone()
Specified by:
getClone in interface UISWTViewCoreEventListenerEx

initYourTableView

public TableViewSWT<PEPiece> initYourTableView()
Specified by:
initYourTableView in class TableViewTab<PEPiece>

fillMenu

public void fillMenu(java.lang.String sColumnName,
                     org.eclipse.swt.widgets.Menu menu)
Specified by:
fillMenu in interface TableViewSWTMenuFillListener

addThisColumnSubMenu

public void addThisColumnSubMenu(java.lang.String sColumnName,
                                 org.eclipse.swt.widgets.Menu menuThisColumn)
Description copied from interface: TableViewSWTMenuFillListener
Create a SubMenu for column specific tasks. Everytime the user opens the context menu, the "This Column" submenu is cleared, and this function is called to refill it.

Specified by:
addThisColumnSubMenu in interface TableViewSWTMenuFillListener
Parameters:
sColumnName - The name of the column the user clicked on
menuThisColumn - the menu to fill with MenuItems

tableDataSourceChanged

public void tableDataSourceChanged(java.lang.Object newDataSource)
Specified by:
tableDataSourceChanged in interface TableDataSourceChangedListener

tableViewInitialized

public void tableViewInitialized()
Specified by:
tableViewInitialized in interface TableLifeCycleListener

tableViewDestroyed

public void tableViewDestroyed()
Specified by:
tableViewDestroyed in interface TableLifeCycleListener

pieceAdded

public void pieceAdded(PEPiece created)
Specified by:
pieceAdded in interface DownloadManagerPieceListener

pieceRemoved

public void pieceRemoved(PEPiece removed)
Specified by:
pieceRemoved in interface DownloadManagerPieceListener

peerAdded

public void peerAdded(PEPeer peer)
Specified by:
peerAdded in interface DownloadManagerPeerListener

peerRemoved

public void peerRemoved(PEPeer peer)
Specified by:
peerRemoved in interface DownloadManagerPeerListener

peerManagerWillBeAdded

public void peerManagerWillBeAdded(PEPeerManager peer_manager)
Description copied from interface: DownloadManagerPeerListener
Called when a peer manager is created but not yet started

Specified by:
peerManagerWillBeAdded in interface DownloadManagerPeerListener

peerManagerAdded

public void peerManagerAdded(PEPeerManager manager)
Specified by:
peerManagerAdded in interface DownloadManagerPeerListener

peerManagerRemoved

public void peerManagerRemoved(PEPeerManager manager)
Specified by:
peerManagerRemoved in interface DownloadManagerPeerListener

getManager

public DownloadManager getManager()
Returns:
the manager

eventOccurred

public boolean eventOccurred(UISWTViewEvent event)
Description copied from interface: UISWTViewEventListener
Triggers when an even listed in UISWTViewEvent occurs

Specified by:
eventOccurred in interface UISWTViewEventListener
Overrides:
eventOccurred in class TableViewTab<PEPiece>
Parameters:
event - event that occurred
Returns:
meaning dependent upon event type