Class SideBar
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkinObjectAdapter
com.biglybt.ui.swt.views.skin.SkinView
com.biglybt.ui.swt.mdi.BaseMDI
com.biglybt.ui.swt.views.skin.sidebar.SideBar
- All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator, UIUpdatable, MultipleDocumentInterface, ObfuscateImage, MultipleDocumentInterfaceSWT, SWTSkinObjectListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SideBarEntrySWTprivate intprivate TimerEventPeriodicprivate List<SideBarEntrySWT> private org.eclipse.swt.graphics.Colorprivate SWTSkinButtonUtilityprivate ParameterListenerprivate ParameterListenerprivate ParameterListenerprivate org.eclipse.swt.widgets.Compositeprotected SideBarEntrySWTprivate org.eclipse.swt.events.SelectionListenerprivate org.eclipse.swt.dnd.DropTargetprotected static final booleanprivate org.eclipse.swt.graphics.Colorprivate org.eclipse.swt.graphics.Fontprivate static final intprivate SideBarEntrySWTprotected SideBarEntrySWTprivate Utils.SashWrapperprivate final List<UISWTViewImpl> protected static final intprotected static final intprivate SWTSkinprivate SWTSkinObjectContainerprivate SWTSkinObjectprivate org.eclipse.swt.widgets.Treeprotected static final booleanprivate static final booleanFields inherited from class BaseMDI
AUTOOPENINFO_DS, AUTOOPENINFO_PARENTID, AUTOOPENINFO_TITLE, CLOSEABLECONFIG_INITIALIDFields inherited from interface MultipleDocumentInterface
SIDEBAR_HEADER_DASHBOARD, SIDEBAR_HEADER_DEVICES, SIDEBAR_HEADER_DISCOVERY, SIDEBAR_HEADER_ORDER_DEFAULT, SIDEBAR_HEADER_PLUGINS, SIDEBAR_HEADER_TRANSFERS, SIDEBAR_HEADER_VUZE, SIDEBAR_POS_FIRST, SIDEBAR_SECTION_ACTIVITIES, SIDEBAR_SECTION_ALL_TRACKERS, SIDEBAR_SECTION_ALLBLOCKS, SIDEBAR_SECTION_ALLPEERS, SIDEBAR_SECTION_ALLPIECES, SIDEBAR_SECTION_ARCHIVED_DOWNLOADS, SIDEBAR_SECTION_BETAPROGRAM, SIDEBAR_SECTION_CHAT, SIDEBAR_SECTION_CLIENT_STATS, SIDEBAR_SECTION_CONFIG, SIDEBAR_SECTION_DEVICES, SIDEBAR_SECTION_DISK_OPS, SIDEBAR_SECTION_DOWNLOAD_HISTORY, SIDEBAR_SECTION_LIBRARY, SIDEBAR_SECTION_LIBRARY_CAT_INSTANCES, SIDEBAR_SECTION_LIBRARY_CD, SIDEBAR_SECTION_LIBRARY_DL, SIDEBAR_SECTION_LIBRARY_TAG_INSTANCES, SIDEBAR_SECTION_LIBRARY_UNOPENED, SIDEBAR_SECTION_LOGGER, SIDEBAR_SECTION_MY_SHARES, SIDEBAR_SECTION_MY_TRACKER, SIDEBAR_SECTION_PLUGINS, SIDEBAR_SECTION_SEARCH, SIDEBAR_SECTION_SUBSCRIPTIONS, SIDEBAR_SECTION_TAG_DISCOVERY, SIDEBAR_SECTION_TAGS, SIDEBAR_SECTION_TORRENT_DETAILS, SIDEBAR_SECTION_TORRENT_OPTIONS, SIDEBAR_SECTION_WELCOME, SIDEBAR_TRANSFERS_SECTION_ORDERFields inherited from interface SWTSkinObjectListener
EVENT_CREATE_REQUEST, EVENT_CREATED, EVENT_DATASOURCE_CHANGED, EVENT_DESTROY, EVENT_HIDE, EVENT_LANGUAGE_CHANGE, EVENT_OBFUSCATE, EVENT_SELECT, EVENT_SHOW, NAMES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void_setupNewEntry(SideBarEntrySWT entry, String id, boolean expandParent, boolean closeable) private voidprivate voidprivate voidprivate voidaddHistory(MdiEntry entry) voidaddItem(BaseMdiEntry entry) private voidaddSideBarView(UISWTViewImpl view, org.eclipse.swt.widgets.Composite cPluginsArea) voidbuildMDI(SWTSkinObject skinObject) voidbuildMDI(org.eclipse.swt.widgets.Composite parent) Builds MDI and populates it with entries registered to id or datasourcetypebooleancanPopoutEntry(MdiEntry entry) closeEntryByID(String id, boolean user_initiated) createEntry(UISWTViewBuilderCore builder, boolean closeable) protected SideBarEntrySWTcreateEntryByCreationListener(String id, Map<?, ?> autoOpenInfo) createEntryFromSkinRef(String parentEntryID, String id, String configID, String title, ViewTitleInfo titleInfo, Object params, boolean closeable, String preferredAfterID) If you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'createHeader(String id, String titleID, String preferredAfterID) private voidprivate voidprivate org.eclipse.swt.widgets.TreeItemcreateTreeItem(SideBarEntrySWT entry, org.eclipse.swt.widgets.TreeItem parentSwtItem, int index) protected voiddefaultDrop(org.eclipse.swt.dnd.DropTargetEvent event) protected booleanfillDropDownMenu(org.eclipse.swt.widgets.Menu menuDropDown, org.eclipse.swt.widgets.TreeItem[] items, int indent) voidvoidgenerate(IndentWriter writer) protected org.eclipse.swt.graphics.ColorgetEntryBySkinView(Object skinView) org.eclipse.swt.graphics.FontgetMenuEntry(boolean activeOnly) protected Stringprotected org.eclipse.swt.widgets.TreegetTree()private org.eclipse.swt.widgets.TreeItemgetTreeItemAt(int pos) private org.eclipse.swt.widgets.TreeItemgetTreeItemAt(org.eclipse.swt.widgets.TreeItem[] items, int[] pos) protected intbooleanprotected voiditemSelected(MdiEntry entry) org.eclipse.swt.graphics.ImageobfuscatedImage(org.eclipse.swt.graphics.Image image) booleanpopoutEntry(MdiEntry entry, Map<String, Object> options) private voidprotected voidrequestAttention(SideBarEntrySWT entry) voidprotected voidprotected voidprivate voidprotected voidsetSelectedEntry(MdiEntrySWT entry) private voidsetupNewEntry(SideBarEntrySWT entry, String id, boolean expandParent, boolean closeable) protected voidvoidprivate voidshowNext()private voidskinObjectCreated(SWTSkinObject skinObject, Object params) Skin Object was created.skinObjectDestroyed(SWTSkinObject skinObject, Object params) Skin Object was destroyedskinObjectInitialShow(SWTSkinObject skinObject, Object params) private voidprivate voidswt_redraw(org.eclipse.swt.widgets.TreeItem[] items) private voidprivate voidswt_updateSideBarColors(org.eclipse.swt.widgets.TreeItem[] items) private voidswt_updateSideBarHitAreasY(SideBarEntrySWT[] entries) private voidvoidupdateUI()Update your UI!protected booleanMethods inherited from class BaseMDI
addListener, addListener, addListener, canShowEntryByID, closeEntry, closeEntry, closeEntryByID, createEntryFromEventListener, deregisterEntry, deregisterEntry, entryExists, fillMenu, getChildrenOf, getDataSourceType, getEntries, getEntries, getEntriesCount, getEntry, getEntryFromSkinObject, getMenuHackListeners, getMenuIdPrefix, getParentView, getPreferredOrder, getUpdateUIName, getViewID, isInitialized, loadEntryByID, loadEntryByID, popoutEntryByID, registerEntry, registerEntry, removeEntryAutoOpen, removeItem, removeItem, removeListener, removeListener, removeListener, saveCloseables, setCloseableConfigFile, setDefaultEntryID, setEntryAutoOpen, setPreferredOrder, showEntryByID, showEntryByID, triggerEntryLoadedListeners, triggerSelectionListener, updateLanguage, willEntryAutoOpenMethods inherited from class SkinView
getMainSkinObject, getMdiEntry, getSkin, getSkinObject, isDisposed, setMainSkinObject, skinObjectHidden, skinObjectShownMethods inherited from class SWTSkinObjectAdapter
dataSourceChanged, eventOccured, skinObjectSelectedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MultipleDocumentInterface
isDisposed
-
Field Details
-
END_INDENT
protected static final boolean END_INDENT -
USE_PAINT
private static final boolean USE_PAINT -
USE_NATIVE_EXPANDER
protected static final boolean USE_NATIVE_EXPANDER -
GAP_BETWEEN_LEVEL_1
private static final int GAP_BETWEEN_LEVEL_1 -
SIDEBAR_ATTENTION_PERIOD
protected static final int SIDEBAR_ATTENTION_PERIOD- See Also:
-
SIDEBAR_ATTENTION_DURATION
protected static final int SIDEBAR_ATTENTION_DURATION- See Also:
-
skin
-
soSideBarContents
-
tree
private org.eclipse.swt.widgets.Tree tree -
fontHeader
private org.eclipse.swt.graphics.Font fontHeader -
soSideBarPopout
-
btnCloseItem
-
dropDownSelectionListener
private org.eclipse.swt.events.SelectionListener dropDownSelectionListener -
dropTarget
private org.eclipse.swt.dnd.DropTarget dropTarget -
draggingOver
-
mousingOver
-
fg
private org.eclipse.swt.graphics.Color fg -
bg
private org.eclipse.swt.graphics.Color bg -
attention_seekers
-
attention_event
-
cPluginsArea
private org.eclipse.swt.widgets.Composite cPluginsArea -
pluginSash
-
pluginViews
-
configShowSideBarListener
-
configRedrawListener
-
configBGColorListener
-
swtViewListener
-
activeMenuEntry
-
lastMenuEntry
-
entryViewHistory
-
entryViewFuture
-
idle_pending
-
activity_count
private int activity_count
-
-
Constructor Details
-
SideBar
public SideBar()
-
-
Method Details
-
buildMDI
public void buildMDI(org.eclipse.swt.widgets.Composite parent) Description copied from interface:MultipleDocumentInterfaceSWTBuilds MDI and populates it with entries registered to id or datasourcetype- Specified by:
buildMDIin interfaceMultipleDocumentInterfaceSWT- Parameters:
parent-
-
buildMDI
- Specified by:
buildMDIin interfaceMultipleDocumentInterfaceSWT
-
skinObjectCreated
Description copied from class:SWTSkinObjectAdapterSkin Object was created. All children are guaranteed to be created.- Overrides:
skinObjectCreatedin classSkinView
-
addGeneralMenus
private void addGeneralMenus()- Since:
- 3.1.0.1
-
getShowIDAtStartup
- Overrides:
getShowIDAtStartupin classBaseMDI
-
canPopoutEntry
-
popoutEntry
-
flipSideBarVisibility
public void flipSideBarVisibility()- Since:
- 3.1.1.1
-
updateSidebarVisibility
private void updateSidebarVisibility() -
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceMultipleDocumentInterface- Overrides:
isVisiblein classSkinView- Returns:
- the visible
-
skinObjectInitialShow
- Overrides:
skinObjectInitialShowin classBaseMDI- Parameters:
skinObject-params-- Returns:
-
setupPluginViews
protected void setupPluginViews()- Overrides:
setupPluginViewsin classBaseMDI
-
skinObjectDestroyed
Description copied from class:SWTSkinObjectAdapterSkin Object was destroyed- Overrides:
skinObjectDestroyedin classBaseMDI
-
setBackground
-
getBackground
protected org.eclipse.swt.graphics.Color getBackground() -
createSideBar
private void createSideBar() -
createSideBarPluginViews
private void createSideBarPluginViews() -
addSideBarView
-
removeSideBarView
-
defaultDrop
protected void defaultDrop(org.eclipse.swt.dnd.DropTargetEvent event) - Parameters:
event-
-
fillDropDownMenu
protected boolean fillDropDownMenu(org.eclipse.swt.widgets.Menu menuDropDown, org.eclipse.swt.widgets.TreeItem[] items, int indent) - Parameters:
menuDropDown-- Since:
- 3.1.1.1
-
swt_updateSideBarHitAreasY
- Since:
- 3.1.1.1
-
swt_updateSideBarColors
private void swt_updateSideBarColors() -
swt_updateSideBarColors
private void swt_updateSideBarColors(org.eclipse.swt.widgets.TreeItem[] items) -
swt_redraw
private void swt_redraw() -
swt_redraw
private void swt_redraw(org.eclipse.swt.widgets.TreeItem[] items) -
indexOf
-
createHeader
- Specified by:
createHeaderin interfaceMultipleDocumentInterface
-
setupNewEntry
private void setupNewEntry(SideBarEntrySWT entry, String id, boolean expandParent, boolean closeable) -
_setupNewEntry
private void _setupNewEntry(SideBarEntrySWT entry, String id, boolean expandParent, boolean closeable) -
createTreeItem
private org.eclipse.swt.widgets.TreeItem createTreeItem(SideBarEntrySWT entry, org.eclipse.swt.widgets.TreeItem parentSwtItem, int index) -
setSelectedEntry
- Overrides:
setSelectedEntryin classBaseMDI
-
showEntry
- Specified by:
showEntryin interfaceMultipleDocumentInterface
-
createEntry
- Specified by:
createEntryin interfaceMultipleDocumentInterfaceSWT- Returns:
- Newly created MDI Entry
-
createEntryFromSkinRef
public SideBarEntrySWT createEntryFromSkinRef(String parentEntryID, String id, String configID, String title, ViewTitleInfo titleInfo, Object params, boolean closeable, String preferredAfterID) Description copied from interface:MultipleDocumentInterfaceIf you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'- Specified by:
createEntryFromSkinRefin interfaceMultipleDocumentInterface- Specified by:
createEntryFromSkinRefin classBaseMDI- Parameters:
parentEntryID-id-configID-title-titleInfo-params-closeable-preferredAfterID-- Returns:
-
updateUI
public void updateUI()Description copied from interface:UIUpdatableUpdate your UI!- Specified by:
updateUIin interfaceUIUpdatable- Overrides:
updateUIin classBaseMDI
-
wasEntryLoadedOnce
- Specified by:
wasEntryLoadedOncein classBaseMDI
-
setEntryLoadedOnce
- Specified by:
setEntryLoadedOncein classBaseMDI
-
getHeaderFont
public org.eclipse.swt.graphics.Font getHeaderFont() -
getTree
protected org.eclipse.swt.widgets.Tree getTree() -
requestAttention
-
getTreeItemAt
private org.eclipse.swt.widgets.TreeItem getTreeItemAt(int pos) -
getTreeItemAt
private org.eclipse.swt.widgets.TreeItem getTreeItemAt(org.eclipse.swt.widgets.TreeItem[] items, int[] pos) -
addItem
-
itemSelected
- Overrides:
itemSelectedin classBaseMDI
-
closeEntryByID
- Overrides:
closeEntryByIDin classBaseMDI
-
addHistory
-
showNext
private void showNext() -
showPrevious
private void showPrevious() -
generate
- Specified by:
generatein interfaceAEDiagnosticsEvidenceGenerator
-
obfuscatedImage
public org.eclipse.swt.graphics.Image obfuscatedImage(org.eclipse.swt.graphics.Image image) - Specified by:
obfuscatedImagein interfaceObfuscateImage
-
getEntry
- Specified by:
getEntryin interfaceMultipleDocumentInterface- Specified by:
getEntryin interfaceMultipleDocumentInterfaceSWT- Overrides:
getEntryin classBaseMDI
-
getSelectedEntry
- Specified by:
getSelectedEntryin interfaceMultipleDocumentInterface- Specified by:
getSelectedEntryin interfaceMultipleDocumentInterfaceSWT- Overrides:
getSelectedEntryin classBaseMDI
-
setMenuEntry
-
getMenuEntry
- Specified by:
getMenuEntryin interfaceMultipleDocumentInterface
-
getEntryBySkinView
- Specified by:
getEntryBySkinViewin interfaceMultipleDocumentInterfaceSWT- Overrides:
getEntryBySkinViewin classBaseMDI- Parameters:
skinView-- Returns:
-
createEntryByCreationListener
- Overrides:
createEntryByCreationListenerin classBaseMDI
-
activityStart
private void activityStart() -
activityEnd
private void activityEnd() -
runWhenIdle
- Specified by:
runWhenIdlein interfaceMultipleDocumentInterface
-