Class FilesView
java.lang.Object
com.biglybt.ui.swt.views.table.impl.TableViewTab<DiskManagerFileInfo>
com.biglybt.ui.swt.views.FilesView
- All Implemented Interfaces:
ParameterListener, DownloadManagerListener, AEDiagnosticsEvidenceGenerator, TableDataSourceChangedListener, TableExpansionChangeListener, TableLifeCycleListener, TableRefreshListener, TableSelectionListener, TableViewFilterCheck<DiskManagerFileInfo>, ViewTitleInfo, ObfuscateImage, UISWTViewEventListener, UISWTViewCoreEventListener, TableViewSWTMenuFillListener, EventListener, org.eclipse.swt.events.KeyListener
public class FilesView
extends TableViewTab<DiskManagerFileInfo>
implements TableDataSourceChangedListener, TableSelectionListener, TableViewSWTMenuFillListener, TableRefreshListener, TableExpansionChangeListener, DownloadManagerListener, TableLifeCycleListener, TableViewFilterCheck<DiskManagerFileInfo>, org.eclipse.swt.events.KeyListener, ParameterListener, UISWTViewCoreEventListener, ViewTitleInfo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final Map<String, TableColumnCore[]> (package private) org.eclipse.swt.widgets.Button(package private) org.eclipse.swt.widgets.Button(package private) BubbleTextBox(package private) TableColumnFilterHelper<DiskManagerFileInfo> private FilesView.FilesViewNodeInnerprivate Objectprivate booleanprivate booleanbooleanbooleanprivate static final Objectprivate static final Objectprivate booleanprivate String(package private) BufferedLabelprivate DownloadManager[]static final String(package private) org.eclipse.swt.widgets.MenuItemstatic final Class<DiskManagerFileInfo> (package private) booleanprivate longprivate Map<DownloadManager, Set<Integer>> private longprivate longprivate TagListenerprivate Tag[]private static Comparator<String> private Map<TOTorrentFile, FilesView.FilesViewNodeLeaf> boolean(package private) TableViewSWT<DiskManagerFileInfo> private booleanprivate Stringprivate booleanFields inherited from interface TableLifeCycleListener
EVENT_TABLELIFECYCLE_DESTROYED, EVENT_TABLELIFECYCLE_INITIALIZED, EVENT_TABLELIFECYCLE_SHUTDOWNFields inherited from interface ViewTitleInfo
TITLE_ACTIVE_STATE, TITLE_EXPORTABLE_DATASOURCE, TITLE_IMAGE_TOOLTIP, TITLE_IMAGEID, TITLE_INDICATOR_COLOR, TITLE_INDICATOR_TEXT, TITLE_INDICATOR_TEXT_TOOLTIP, TITLE_TEXT, TITLE_TEXT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddManagerListeners(DownloadManager[] managers) voidaddThisColumnSubMenu(String sColumnName, org.eclipse.swt.widgets.Menu menuThisColumn) Create a SubMenu for column specific tasks.voidcompletionChanged(DownloadManager manager, boolean bCompleted) Notification that the completion state has changed.private voidvoiddefaultSelected(TableRowCore[] rows, int stateMask, int origin) voiddeselected(TableRowCore[] rows) private booleandoTreeAction(List<FilesView.FilesViewNodeInner> nodes, int action, boolean test_only) private booleandoTreeAction(Map<FilesView.FilesViewNodeInner, TableRowCore> node_to_row_map, FilesView.FilesViewNodeInner node, int action, boolean recursive, boolean test_only) voiddownloadComplete(DownloadManager manager) Notification that we were downloading and the download has completedbooleaneventOccurred(UISWTViewEvent event) Triggers when an even listed in UISWTViewEvent occursvoidfileLocationChanged(DownloadManager download, DiskManagerFileInfo file) voidfilePriorityChanged(DownloadManager download, DiskManagerFileInfo file) voidbooleanfilterCheck(DiskManagerFileInfo ds, String filter, boolean regex, boolean confusable) private booleanfilterCheckSupport(DiskManagerFileInfo ds, String filter, boolean regex, boolean confusable) voidvoidfocusChanged(TableRowCore focus) private static TableColumnCore[]getBasicItems(String tableID) private List<DiskManagerFileInfo> private TableRowCoreprivate StringgetTitleInfoProperty(int propertyID) private Stringorg.eclipse.swt.widgets.CompositeinitComposite(org.eclipse.swt.widgets.Composite composite) voidkeyPressed(org.eclipse.swt.events.KeyEvent e) voidkeyReleased(org.eclipse.swt.events.KeyEvent e) voidmouseEnter(TableRowCore row) voidmouseExit(TableRowCore row) voidparameterChanged(String parameterName) Called, when a parameter has changed.voidparentDataSourceChanged(Object newParentDataSource) voidpositionChanged(DownloadManager download, int oldPosition, int newPosition) private voidprivate static voidprivate voidremoveManagerListeners(DownloadManager[] managers) voidrowCollapsed(TableRowCore row) voidrowExpanded(TableRowCore row) voidselected(TableRowCore[] rows) voidselectionChanged(TableRowCore[] selected_rows, TableRowCore[] deselected_rows) Use this instead of selected/deselected if it makes more sensevoidsetDisableWhenEmpty(boolean b) voidsetRefilterCache(Map<Object, Object> cache) voidstateChanged(DownloadManager manager, int state) voidtableDataSourceChanged(Object newDataSource) voidtableLifeCycleEventOccurred(TableView tv, int eventType, Map<String, Object> data) voidvoidprivate voidupdateFlatView(boolean sync) private voidvoidprivate voidprivate voidupdateTreeExpansionState(TableRowCore row, boolean expanded) private voidupdateTreeView(boolean sync) voidMethods inherited from class TableViewTab
allowCreate, dataSourceChanged, delete, enableFilterCheck, generate, getComposite, getFullTitle, getSWTView, getTableView, getTextPrefixID, initialize, obfuscatedImage, refresh, setEnableTabViews, updateLanguage, viewActivatedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableSelectionListener
defaultSelected, focusRequestedMethods inherited from interface TableViewFilterCheck
filterCheck, filterSetMethods inherited from interface UISWTViewEventListener
builderNotRequired, informOfDuplicates
-
Field Details
-
KEY_DM_TREE_STATE
-
KEY_DM_SELECTION_STATE
-
ACTION_EXPAND
private static final int ACTION_EXPAND- See Also:
-
ACTION_COLLAPSE
private static final int ACTION_COLLAPSE- See Also:
-
PLUGIN_DS_TYPE
-
refreshing
boolean refreshing -
basicItemsMap
-
MSGID_PREFIX
- See Also:
-
view_sub_id
-
managers
-
hide_dnd_files
public boolean hide_dnd_files -
hide_pad_files
public boolean hide_pad_files -
tree_view
public boolean tree_view -
viewActive
private boolean viewActive -
selection_size
private volatile long selection_size -
selection_size_with_dnd
private volatile long selection_size_with_dnd -
selection_done
private volatile long selection_done -
path_item
org.eclipse.swt.widgets.MenuItem path_item -
tv
-
col_filter_helper
TableColumnFilterHelper<DiskManagerFileInfo> col_filter_helper -
btnShowDND
org.eclipse.swt.widgets.Button btnShowDND -
btnTreeView
org.eclipse.swt.widgets.Button btnTreeView -
lblHeader
BufferedLabel lblHeader -
bubbleTextBox
BubbleTextBox bubbleTextBox -
disableTableWhenEmpty
private boolean disableTableWhenEmpty -
datasource
-
tags
-
tag_listener
-
filter_cache
-
last_filter_str
-
last_filter_regex
private boolean last_filter_regex -
update_header_pending
private boolean update_header_pending -
force_refresh
private boolean force_refresh -
selection_outstanding
-
current_root
-
tree_file_map
-
tree_comp
-
-
Constructor Details
-
FilesView
public FilesView()Initialize
-
-
Method Details
-
getBasicItems
-
getViewKey
-
initYourTableView
- Specified by:
initYourTableViewin classTableViewTab<DiskManagerFileInfo>
-
registerPluginViews
private static void registerPluginViews() -
initComposite
public org.eclipse.swt.widgets.Composite initComposite(org.eclipse.swt.widgets.Composite composite) - Overrides:
initCompositein classTableViewTab<DiskManagerFileInfo>
-
addManagerListeners
-
removeManagerListeners
-
tableDataSourceChanged
- Specified by:
tableDataSourceChangedin interfaceTableDataSourceChangedListener
-
deselected
- Specified by:
deselectedin interfaceTableSelectionListener
-
focusChanged
- Specified by:
focusChangedin interfaceTableSelectionListener
-
selected
- Specified by:
selectedin interfaceTableSelectionListener
-
prepareSelectionState
private void prepareSelectionState() -
selectionChanged
Description copied from interface:TableSelectionListenerUse this instead of selected/deselected if it makes more sense- Specified by:
selectionChangedin interfaceTableSelectionListener
-
stateChanged
- Specified by:
stateChangedin interfaceDownloadManagerListener
-
downloadComplete
Description copied from interface:DownloadManagerListenerNotification that we were downloading and the download has completed- Specified by:
downloadCompletein interfaceDownloadManagerListener
-
completionChanged
Description copied from interface:DownloadManagerListenerNotification that the completion state has changed. Tells you when we switched from Completed to Incompleted (or visa versa) Does not get called when diskManager goes into CHECKING, but does when it goes out of CHECKING, to avoid torrents jumping momentarily from Completed to Incompleted to Completed again.- Specified by:
completionChangedin interfaceDownloadManagerListener
-
positionChanged
- Specified by:
positionChangedin interfaceDownloadManagerListener
-
filePriorityChanged
- Specified by:
filePriorityChangedin interfaceDownloadManagerListener
-
fileLocationChanged
- Specified by:
fileLocationChangedin interfaceDownloadManagerListener- Parameters:
download-file- null - overall location change (e.g. move download)
-
getRowForFile
-
setRefilterCache
- Specified by:
setRefilterCachein interfaceTableViewFilterCheck<DiskManagerFileInfo>
-
filterCheck
public boolean filterCheck(DiskManagerFileInfo ds, String filter, boolean regex, boolean confusable) - Specified by:
filterCheckin interfaceTableViewFilterCheck<DiskManagerFileInfo>
-
filterCheckSupport
private boolean filterCheckSupport(DiskManagerFileInfo ds, String filter, boolean regex, boolean confusable) -
filterSet
- Specified by:
filterSetin interfaceTableViewFilterCheck<DiskManagerFileInfo>
-
viewChanged
- Specified by:
viewChangedin interfaceTableViewFilterCheck<DiskManagerFileInfo>
-
updateSelectedContent
public void updateSelectedContent() -
defaultSelected
- Specified by:
defaultSelectedin interfaceTableSelectionListener
-
doTreeAction
private boolean doTreeAction(List<FilesView.FilesViewNodeInner> nodes, int action, boolean test_only) -
doTreeAction
private boolean doTreeAction(Map<FilesView.FilesViewNodeInner, TableRowCore> node_to_row_map, FilesView.FilesViewNodeInner node, int action, boolean recursive, boolean test_only) -
fillMenu
- Specified by:
fillMenuin interfaceTableViewSWTMenuFillListener
-
tableRefresh
public void tableRefresh()- Specified by:
tableRefreshin interfaceTableRefreshListener
-
addThisColumnSubMenu
Description copied from interface:TableViewSWTMenuFillListenerCreate 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:
addThisColumnSubMenuin interfaceTableViewSWTMenuFillListener- Parameters:
sColumnName- The name of the column the user clicked onmenuThisColumn- the menu to fill with MenuItems
-
tableLifeCycleEventOccurred
- Specified by:
tableLifeCycleEventOccurredin interfaceTableLifeCycleListener
-
tableViewTabInitComplete
public void tableViewTabInitComplete()- Overrides:
tableViewTabInitCompletein classTableViewTab<DiskManagerFileInfo>
-
mouseEnter
- Specified by:
mouseEnterin interfaceTableSelectionListener
-
mouseExit
- Specified by:
mouseExitin interfaceTableSelectionListener
-
createDragDrop
private void createDragDrop() -
eventOccurred
Description copied from interface:UISWTViewEventListenerTriggers when an even listed in UISWTViewEvent occurs- Specified by:
eventOccurredin interfaceUISWTViewEventListener- Overrides:
eventOccurredin classTableViewTab<DiskManagerFileInfo>- Parameters:
event- event that occurred- Returns:
- meaning dependent upon event type
-
keyPressed
public void keyPressed(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyPressedin interfaceorg.eclipse.swt.events.KeyListener
-
keyReleased
public void keyReleased(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyReleasedin interfaceorg.eclipse.swt.events.KeyListener
-
parameterChanged
Description copied from interface:ParameterListenerCalled, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChangedin interfaceParameterListener- Parameters:
parameterName- the name of the parameter that has changed
-
updateHeader
private void updateHeader() -
getSelectionText
-
setDisableWhenEmpty
public void setDisableWhenEmpty(boolean b) -
rowExpanded
- Specified by:
rowExpandedin interfaceTableExpansionChangeListener
-
rowCollapsed
- Specified by:
rowCollapsedin interfaceTableExpansionChangeListener
-
updateTreeExpansionState
-
updateTable
private void updateTable() -
updateTreeView
private void updateTreeView(boolean sync) -
parentDataSourceChanged
- Overrides:
parentDataSourceChangedin classTableViewTab<DiskManagerFileInfo>
-
getTitleInfoProperty
- Specified by:
getTitleInfoPropertyin interfaceViewTitleInfo- Parameters:
propertyID- TITLE_*- Returns:
- value, or null if you don't want to set it
-
updateFlatView
private void updateFlatView(boolean sync) -
getFileInfo
-