Package com.biglybt.ui.swt.views
Class PiecesViewBase
- java.lang.Object
-
- com.biglybt.ui.swt.views.table.impl.TableViewTab<PEPiece>
-
- com.biglybt.ui.swt.views.PiecesViewBase
-
- All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator
,TableLifeCycleListener
,TableSelectionListener
,TableViewFilterCheck<PEPiece>
,ViewTitleInfo
,ViewTitleInfo2
,ObfuscateImage
,UISWTViewEventListener
,UISWTViewCoreEventListener
,TableViewSWTMenuFillListener
- Direct Known Subclasses:
PiecesSuperView
,PiecesView
public abstract class PiecesViewBase extends TableViewTab<PEPiece> implements TableLifeCycleListener, TableViewSWTMenuFillListener, TableSelectionListener, UISWTViewCoreEventListener, TableViewFilterCheck<PEPiece>, ViewTitleInfo2
Pieces List View Features:
- List of partial pieces
- double-click to show on Piece Map
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PiecesViewBase.PEPieceUploading
-
Nested classes/interfaces inherited from interface com.biglybt.ui.common.table.TableViewFilterCheck
TableViewFilterCheck.TableViewFilterCheckEx<DATASOURCETYPE>
-
-
Field Summary
Fields Modifier and Type Field Description private static TableColumnCore[]
basicItems
private BubbleTextBox
bubbleTextBox
private org.eclipse.swt.widgets.Composite
legendComposite
private static java.lang.String[]
legendKeys
private MultipleDocumentInterfaceSWT
mdi
static java.lang.Class<PEPiece>
PLUGIN_DS_TYPE
private boolean
show_uploading
private boolean
shown
protected TableViewSWT<PEPiece>
tv
private java.util.Map<java.lang.Long,PiecesViewBase.PEPieceUploading>
uploading_pieces
-
Fields inherited from interface com.biglybt.ui.common.table.TableLifeCycleListener
EVENT_TABLELIFECYCLE_DESTROYED, EVENT_TABLELIFECYCLE_INITIALIZED, EVENT_TABLELIFECYCLE_SHUTDOWN
-
Fields inherited from interface com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo
TITLE_ACTIVE_STATE, TITLE_EXPORTABLE_DATASOURCE, TITLE_IMAGE_TOOLTIP, TITLE_IMAGEID, TITLE_INDICATOR_COLOR, TITLE_INDICATOR_TEXT, TITLE_INDICATOR_TEXT_TOOLTIP, TITLE_TEXT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PiecesViewBase(java.lang.String id)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addThisColumnSubMenu(java.lang.String sColumnName, org.eclipse.swt.widgets.Menu menuThisColumn)
Create a SubMenu for column specific tasks.protected void
clearUploadingPieces()
void
defaultSelected(TableRowCore[] rows, int keyMask, int origin)
void
deselected(TableRowCore[] rows)
boolean
eventOccurred(UISWTViewEvent event)
Triggers when an even listed in UISWTViewEvent occursvoid
fillMenu(java.lang.String sColumnName, org.eclipse.swt.widgets.Menu menu)
boolean
filterCheck(PEPiece piece, java.lang.String filter, boolean regex)
void
filterSet(java.lang.String filter)
void
focusChanged(TableRowCore focus)
(package private) static TableColumnCore[]
getBasicColumnItems(java.lang.String table_id)
static org.eclipse.swt.graphics.Color
getLegendColor(java.lang.String key)
protected abstract java.util.List<PEPeerManager>
getPeerManagers()
protected abstract java.lang.String
getTableID()
java.lang.Object
getTitleInfoProperty(int propertyID)
int
getUploadingPieceCount()
org.eclipse.swt.widgets.Composite
initComposite(org.eclipse.swt.widgets.Composite composite)
protected TableViewSWT<PEPiece>
initYourTableView(java.lang.String table_id)
void
mouseEnter(TableRowCore row)
void
mouseExit(TableRowCore row)
private static void
registerPluginViews()
void
selected(TableRowCore[] rows)
private void
setShowUploading(boolean enabled)
void
tableLifeCycleEventOccurred(TableView tv, int eventType, java.util.Map<java.lang.String,java.lang.Object> data)
protected void
tableViewDestroyed()
protected void
tableViewInitialized()
void
titleInfoLinked(MultipleDocumentInterface mdi, MdiEntry mdiEntry)
protected abstract void
updateSelectedContent()
protected boolean
updateUploadingPieces(boolean process_queue)
-
Methods inherited from class com.biglybt.ui.swt.views.table.impl.TableViewTab
allowCreate, dataSourceChanged, delete, enableFilterCheck, generate, getComposite, getFullTitle, getPropertiesPrefix, getSWTView, getTableView, initialize, initYourTableView, obfuscatedImage, parentDataSourceChanged, refresh, tableViewTabInitComplete, updateLanguage, viewActivated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.ui.common.table.TableSelectionListener
defaultSelected, selectionChanged
-
Methods inherited from interface com.biglybt.ui.common.viewtitleinfo.ViewTitleInfo2
getLinkedMdiEntry
-
-
-
-
Field Detail
-
PLUGIN_DS_TYPE
public static final java.lang.Class<PEPiece> PLUGIN_DS_TYPE
-
basicItems
private static final TableColumnCore[] basicItems
-
legendKeys
private static java.lang.String[] legendKeys
-
bubbleTextBox
private BubbleTextBox bubbleTextBox
-
tv
protected TableViewSWT<PEPiece> tv
-
legendComposite
private org.eclipse.swt.widgets.Composite legendComposite
-
mdi
private MultipleDocumentInterfaceSWT mdi
-
shown
private boolean shown
-
uploading_pieces
private java.util.Map<java.lang.Long,PiecesViewBase.PEPieceUploading> uploading_pieces
-
show_uploading
private boolean show_uploading
-
-
Method Detail
-
getBasicColumnItems
static TableColumnCore[] getBasicColumnItems(java.lang.String table_id)
-
getLegendColor
public static org.eclipse.swt.graphics.Color getLegendColor(java.lang.String key)
-
getTableID
protected abstract java.lang.String getTableID()
-
initComposite
public org.eclipse.swt.widgets.Composite initComposite(org.eclipse.swt.widgets.Composite composite)
- Overrides:
initComposite
in classTableViewTab<PEPiece>
-
initYourTableView
protected TableViewSWT<PEPiece> initYourTableView(java.lang.String table_id)
-
getPeerManagers
protected abstract java.util.List<PEPeerManager> getPeerManagers()
-
setShowUploading
private void setShowUploading(boolean enabled)
-
registerPluginViews
private static void registerPluginViews()
-
fillMenu
public void fillMenu(java.lang.String sColumnName, org.eclipse.swt.widgets.Menu menu)
- Specified by:
fillMenu
in interfaceTableViewSWTMenuFillListener
-
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 interfaceTableViewSWTMenuFillListener
- Parameters:
sColumnName
- The name of the column the user clicked onmenuThisColumn
- the menu to fill with MenuItems
-
tableLifeCycleEventOccurred
public void tableLifeCycleEventOccurred(TableView tv, int eventType, java.util.Map<java.lang.String,java.lang.Object> data)
- Specified by:
tableLifeCycleEventOccurred
in interfaceTableLifeCycleListener
-
tableViewInitialized
protected void tableViewInitialized()
-
tableViewDestroyed
protected void tableViewDestroyed()
-
filterSet
public void filterSet(java.lang.String filter)
- Specified by:
filterSet
in interfaceTableViewFilterCheck<PEPiece>
-
filterCheck
public boolean filterCheck(PEPiece piece, java.lang.String filter, boolean regex)
- Specified by:
filterCheck
in interfaceTableViewFilterCheck<PEPiece>
-
updateUploadingPieces
protected boolean updateUploadingPieces(boolean process_queue)
-
getUploadingPieceCount
public int getUploadingPieceCount()
-
clearUploadingPieces
protected void clearUploadingPieces()
-
defaultSelected
public void defaultSelected(TableRowCore[] rows, int keyMask, int origin)
- Specified by:
defaultSelected
in interfaceTableSelectionListener
-
updateSelectedContent
protected abstract void updateSelectedContent()
-
deselected
public void deselected(TableRowCore[] rows)
- Specified by:
deselected
in interfaceTableSelectionListener
-
focusChanged
public void focusChanged(TableRowCore focus)
- Specified by:
focusChanged
in interfaceTableSelectionListener
-
selected
public void selected(TableRowCore[] rows)
- Specified by:
selected
in interfaceTableSelectionListener
-
mouseEnter
public void mouseEnter(TableRowCore row)
- Specified by:
mouseEnter
in interfaceTableSelectionListener
-
mouseExit
public void mouseExit(TableRowCore row)
- Specified by:
mouseExit
in interfaceTableSelectionListener
-
eventOccurred
public boolean eventOccurred(UISWTViewEvent event)
Description copied from interface:UISWTViewEventListener
Triggers when an even listed in UISWTViewEvent occurs- Specified by:
eventOccurred
in interfaceUISWTViewEventListener
- Overrides:
eventOccurred
in classTableViewTab<PEPiece>
- Parameters:
event
- event that occurred- Returns:
- meaning dependent upon event type
-
titleInfoLinked
public void titleInfoLinked(MultipleDocumentInterface mdi, MdiEntry mdiEntry)
- Specified by:
titleInfoLinked
in interfaceViewTitleInfo2
-
getTitleInfoProperty
public java.lang.Object getTitleInfoProperty(int propertyID)
- Specified by:
getTitleInfoProperty
in interfaceViewTitleInfo
- Parameters:
propertyID
- TITLE_*- Returns:
- value, or null if you don't want to set it
-
-