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 SideBarEntrySWT
private int
private TimerEventPeriodic
private List
<SideBarEntrySWT> private org.eclipse.swt.graphics.Color
private SWTSkinButtonUtility
private ParameterListener
private ParameterListener
private ParameterListener
private org.eclipse.swt.widgets.Composite
protected SideBarEntrySWT
private org.eclipse.swt.events.SelectionListener
private org.eclipse.swt.dnd.DropTarget
protected static final boolean
private org.eclipse.swt.graphics.Color
private org.eclipse.swt.graphics.Font
private static final int
private SideBarEntrySWT
protected SideBarEntrySWT
private Utils.SashWrapper
private final List
<UISWTViewImpl> protected static final int
protected static final int
private SWTSkin
private SWTSkinObjectContainer
private SWTSkinObject
private org.eclipse.swt.widgets.Tree
protected static final boolean
private static final boolean
Fields inherited from class com.biglybt.ui.swt.mdi.BaseMDI
AUTOOPENINFO_DS, AUTOOPENINFO_PARENTID, AUTOOPENINFO_TITLE, CLOSEABLECONFIG_INITIALID
Fields inherited from interface com.biglybt.ui.mdi.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_ORDER
Fields inherited from interface com.biglybt.ui.swt.skin.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 void
private void
private void
private void
addHistory
(MdiEntry entry) void
addItem
(BaseMdiEntry entry) private void
addSideBarView
(UISWTViewImpl view, org.eclipse.swt.widgets.Composite cPluginsArea) void
buildMDI
(SWTSkinObject skinObject) void
buildMDI
(org.eclipse.swt.widgets.Composite parent) Builds MDI and populates it with entries registered to id or datasourcetypeboolean
canPopoutEntry
(MdiEntry entry) closeEntryByID
(String id, boolean user_initiated) createEntry
(UISWTViewBuilderCore builder, boolean closeable) protected SideBarEntrySWT
createEntryByCreationListener
(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 void
private void
private org.eclipse.swt.widgets.TreeItem
createTreeItem
(SideBarEntrySWT entry, org.eclipse.swt.widgets.TreeItem parentSwtItem, int index) protected void
defaultDrop
(org.eclipse.swt.dnd.DropTargetEvent event) protected boolean
fillDropDownMenu
(org.eclipse.swt.widgets.Menu menuDropDown, org.eclipse.swt.widgets.TreeItem[] items, int indent) void
void
generate
(IndentWriter writer) protected org.eclipse.swt.graphics.Color
getEntryBySkinView
(Object skinView) org.eclipse.swt.graphics.Font
getMenuEntry
(boolean activeOnly) protected String
protected org.eclipse.swt.widgets.Tree
getTree()
private org.eclipse.swt.widgets.TreeItem
getTreeItemAt
(int pos) private org.eclipse.swt.widgets.TreeItem
getTreeItemAt
(org.eclipse.swt.widgets.TreeItem[] items, int[] pos) protected int
boolean
protected void
itemSelected
(MdiEntry entry) org.eclipse.swt.graphics.Image
obfuscatedImage
(org.eclipse.swt.graphics.Image image) boolean
popoutEntry
(MdiEntry entry, Map<String, Object> options) private void
protected void
requestAttention
(SideBarEntrySWT entry) void
protected void
protected void
private void
protected void
setSelectedEntry
(MdiEntrySWT entry) private void
setupNewEntry
(SideBarEntrySWT entry, String id, boolean expandParent, boolean closeable) protected void
void
private void
showNext()
private void
skinObjectCreated
(SWTSkinObject skinObject, Object params) Skin Object was created.skinObjectDestroyed
(SWTSkinObject skinObject, Object params) Skin Object was destroyedskinObjectInitialShow
(SWTSkinObject skinObject, Object params) private void
private void
swt_redraw
(org.eclipse.swt.widgets.TreeItem[] items) private void
private void
swt_updateSideBarColors
(org.eclipse.swt.widgets.TreeItem[] items) private void
swt_updateSideBarHitAreasY
(SideBarEntrySWT[] entries) private void
void
updateUI()
Update your UI!protected boolean
Methods inherited from class com.biglybt.ui.swt.mdi.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, willEntryAutoOpen
Methods inherited from class com.biglybt.ui.swt.views.skin.SkinView
getMainSkinObject, getMdiEntry, getSkin, getSkinObject, isDisposed, setMainSkinObject, skinObjectHidden, skinObjectShown
Methods inherited from class com.biglybt.ui.swt.skin.SWTSkinObjectAdapter
dataSourceChanged, eventOccured, skinObjectSelected
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.mdi.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:MultipleDocumentInterfaceSWT
Builds MDI and populates it with entries registered to id or datasourcetype- Specified by:
buildMDI
in interfaceMultipleDocumentInterfaceSWT
- Parameters:
parent
-
-
buildMDI
- Specified by:
buildMDI
in interfaceMultipleDocumentInterfaceSWT
-
skinObjectCreated
Description copied from class:SWTSkinObjectAdapter
Skin Object was created. All children are guaranteed to be created.- Overrides:
skinObjectCreated
in classSkinView
-
addGeneralMenus
private void addGeneralMenus()- Since:
- 3.1.0.1
-
getShowIDAtStartup
- Overrides:
getShowIDAtStartup
in classBaseMDI
-
canPopoutEntry
-
popoutEntry
- Specified by:
popoutEntry
in classBaseMDI
-
flipSideBarVisibility
public void flipSideBarVisibility()- Since:
- 3.1.1.1
-
updateSidebarVisibility
private void updateSidebarVisibility() -
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceMultipleDocumentInterface
- Overrides:
isVisible
in classSkinView
- Returns:
- the visible
-
skinObjectInitialShow
- Overrides:
skinObjectInitialShow
in classBaseMDI
- Parameters:
skinObject
-params
-- Returns:
-
setupPluginViews
protected void setupPluginViews()- Overrides:
setupPluginViews
in classBaseMDI
-
skinObjectDestroyed
Description copied from class:SWTSkinObjectAdapter
Skin Object was destroyed- Overrides:
skinObjectDestroyed
in 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:
createHeader
in 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:
setSelectedEntry
in classBaseMDI
-
showEntry
- Specified by:
showEntry
in interfaceMultipleDocumentInterface
-
createEntry
- Specified by:
createEntry
in 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:MultipleDocumentInterface
If you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'- Specified by:
createEntryFromSkinRef
in interfaceMultipleDocumentInterface
- Specified by:
createEntryFromSkinRef
in classBaseMDI
- Parameters:
parentEntryID
-id
-configID
-title
-titleInfo
-params
-closeable
-preferredAfterID
-- Returns:
-
updateUI
public void updateUI()Description copied from interface:UIUpdatable
Update your UI!- Specified by:
updateUI
in interfaceUIUpdatable
- Overrides:
updateUI
in classBaseMDI
-
wasEntryLoadedOnce
- Specified by:
wasEntryLoadedOnce
in classBaseMDI
-
setEntryLoadedOnce
- Specified by:
setEntryLoadedOnce
in 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:
itemSelected
in classBaseMDI
-
closeEntryByID
- Overrides:
closeEntryByID
in classBaseMDI
-
addHistory
-
showNext
private void showNext() -
showPrevious
private void showPrevious() -
generate
- Specified by:
generate
in interfaceAEDiagnosticsEvidenceGenerator
-
obfuscatedImage
public org.eclipse.swt.graphics.Image obfuscatedImage(org.eclipse.swt.graphics.Image image) - Specified by:
obfuscatedImage
in interfaceObfuscateImage
-
getEntry
- Specified by:
getEntry
in interfaceMultipleDocumentInterface
- Specified by:
getEntry
in interfaceMultipleDocumentInterfaceSWT
- Overrides:
getEntry
in classBaseMDI
-
getSelectedEntry
- Specified by:
getSelectedEntry
in interfaceMultipleDocumentInterface
- Specified by:
getSelectedEntry
in interfaceMultipleDocumentInterfaceSWT
- Overrides:
getSelectedEntry
in classBaseMDI
-
setMenuEntry
-
getMenuEntry
- Specified by:
getMenuEntry
in interfaceMultipleDocumentInterface
-
getEntryBySkinView
- Specified by:
getEntryBySkinView
in interfaceMultipleDocumentInterfaceSWT
- Overrides:
getEntryBySkinView
in classBaseMDI
- Parameters:
skinView
-- Returns:
-
createEntryByCreationListener
- Overrides:
createEntryByCreationListener
in classBaseMDI
-
activityStart
private void activityStart() -
activityEnd
private void activityEnd() -
runWhenIdle
- Specified by:
runWhenIdle
in interfaceMultipleDocumentInterface
-