Class BaseMDI
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkinObjectAdapter
com.biglybt.ui.swt.views.skin.SkinView
com.biglybt.ui.swt.mdi.BaseMDI
- All Implemented Interfaces:
UIUpdatable, MultipleDocumentInterface, MultipleDocumentInterfaceSWT, SWTSkinObjectListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprivate final Objectprivate TimerEventstatic final Stringprivate Stringprivate booleanprivate MdiEntrySWTprivate Stringprivate Stringprivate booleanprivate Stringprivate final List<MdiListener> private final List<MdiEntryLoadedListener> private List<MdiSWTMenuHackListener> private LinkedHashMap<String, Map> mapAutoOpen: Map<ViewID, AutoOpenInfo> AutoOpenInfo: Map<String, Object> "title" : String "datasource" : misc "parentID" : Stringprivate booleanprivate Map<String, MdiEntryCreationListener> private Map<String, MdiEntryCreationListener2> private final Map<String, BaseMdiEntry> private final UISWTViewprivate final Class<?> private String[]private final StringFields 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 TypeMethodDescriptionvoidaddItem(BaseMdiEntry entry) voidvoidvoidprivate voidprivate booleanbooleanfinal BaseMdiEntrycloseEntry(MdiEntry entry, boolean userInitiated) CloseMdiEntryfinal voidcloseEntry(String id) CloseMdiEntrywith id and remove from auto-open listcloseEntryByID(String id) CloseMdiEntryof idprotected BaseMdiEntrycloseEntryByID(String id, boolean userInitiated) protected MdiEntrycreateEntryByCreationListener(String id, Map<?, ?> autoOpenInfo) final MdiEntrycreateEntryFromEventListener(String parentID, UISWTViewEventListener l, String id, boolean closeable, Object datasource, String preferedAfterID) Deprecated.Use createEntryFromHolder(parentEntryID, null, new UISWTViewEventListenerHolder(id, l, datasource, null), id, closeable, preferedAfterID);abstract MdiEntrycreateEntryFromSkinRef(String parentEntryID, String id, String configID, String title, ViewTitleInfo titleInfo, Object params, boolean closeable, String preferedAfterID) If you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'private booleanvoidvoidbooleanentryExists(String id) voidgetChildrenOf(String id) <T extends MdiEntry>
T[]getEntries(T[] array) intgetEntryBySkinView(Object skinView) static BaseMdiEntrygetEntryFromSkinObject(PluginUISWTSkinObject pluginSkinObject) String[]protected StringA name for this UIUpdatable so we can track who's being badbooleanprotected voiditemSelected(MdiEntry entry) private MdiEntryloadAndGetEntryByID(String id, boolean activate, boolean onlyLoadOnce, Object datasource) private voidbooleanloadEntryByID(String id, boolean activate) booleanloadEntryByID(String id, boolean activate, boolean onlyLoadOnce, Object datasource) abstract booleanpopoutEntry(MdiEntry entry, Map<String, Object> options) booleanprivate booleanprocessAutoOpenMap(String id, Map<?, ?> autoOpenInfo, UISWTViewBuilderCore builder) voidvoidprivate voidvoidvoidremoveItem(MdiEntry entry) protected voidremoveItem(MdiEntry entry, boolean removeChildren) voidvoidvoidprotected voidprivate voidsaveCloseables(boolean interim) voidsetCloseableConfigFile(String closeableConfigFile) voidsetDefaultEntryID(String def) voidsetEntryAutoOpen(String id, Map autoOpenInfo) When an entry can not be opened (ie.protected abstract voidvoidsetPreferredOrder(String[] preferredOrder) protected voidsetSelectedEntry(MdiEntrySWT entry) protected voidbooleanshowEntryByID(String id) booleanshowEntryByID(String id, Object datasource) skinObjectDestroyed(SWTSkinObject skinObject, Object params) Skin Object was destroyedskinObjectInitialShow(SWTSkinObject skinObject, Object params) voidprotected voidtriggerSelectionListener(MdiEntry newEntry, MdiEntry oldEntry) updateLanguage(SWTSkinObject skinObject, Object params) skinObject needs to update any textvoidupdateUI()Update your UI!protected abstract booleanbooleanMethods inherited from class SkinView
getMainSkinObject, getMdiEntry, getSkin, getSkinObject, isDisposed, isVisible, setMainSkinObject, skinObjectCreated, 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
createHeader, getMenuEntry, isDisposed, isVisible, runWhenIdle, showEntryMethods inherited from interface MultipleDocumentInterfaceSWT
buildMDI, buildMDI, createEntry
-
Field Details
-
CLOSEABLECONFIG_INITIALID
- See Also:
-
pluginDataSourceType
-
viewID
-
parentView
-
currentEntry
-
mapIdToCreationListener
-
mapIdToCreationListener2
-
mapIdToEntry
-
listeners
-
listLoadListeners
-
listMenuHackListners
-
autoOpenLock
-
AUTOOPENINFO_TITLE
- See Also:
-
AUTOOPENINFO_DS
- See Also:
-
AUTOOPENINFO_PARENTID
- See Also:
-
mapAutoOpen
mapAutoOpen: Map<ViewID, AutoOpenInfo> AutoOpenInfo: Map<String, Object> "title" : String "datasource" : misc "parentID" : String
-
mapAutoOpenLoaded
private volatile boolean mapAutoOpenLoaded -
autoOpenSaver
-
preferredOrder
-
closeableConfigFile
-
swtViewListener
-
initialized
private volatile boolean initialized -
closed
private volatile boolean closed -
lastValidViewID
-
initialID
-
initialDef
-
-
Constructor Details
-
BaseMDI
-
-
Method Details
-
addListener
- Specified by:
addListenerin interfaceMultipleDocumentInterface
-
removeListener
- Specified by:
removeListenerin interfaceMultipleDocumentInterface
-
addListener
- Specified by:
addListenerin interfaceMultipleDocumentInterface
-
removeListener
- Specified by:
removeListenerin interfaceMultipleDocumentInterface
-
triggerSelectionListener
-
triggerEntryLoadedListeners
-
closeEntry
Description copied from interface:MultipleDocumentInterfaceCloseMdiEntrywith id and remove from auto-open list- Specified by:
closeEntryin interfaceMultipleDocumentInterface
-
closeEntry
Description copied from interface:MultipleDocumentInterfaceCloseMdiEntry- Specified by:
closeEntryin interfaceMultipleDocumentInterface- Parameters:
userInitiated- whether or not the user explicitly closed this view (used for the dynamic Downloading library view, for example...)- Returns:
- Entry that was closed, or null if entry wasn't closed (ie. didn't exist)
-
closeEntryByID
Description copied from interface:MultipleDocumentInterfaceCloseMdiEntryof id- Specified by:
closeEntryByIDin interfaceMultipleDocumentInterface- Returns:
- Entry that was closed, or null if entry wasn't closed (ie. didn't exist)
-
closeEntryByID
-
getMenuIdPrefix
-
createEntryFromEventListener
public final MdiEntry createEntryFromEventListener(String parentID, UISWTViewEventListener l, String id, boolean closeable, Object datasource, String preferedAfterID) Deprecated.Use createEntryFromHolder(parentEntryID, null, new UISWTViewEventListenerHolder(id, l, datasource, null), id, closeable, preferedAfterID);- Specified by:
createEntryFromEventListenerin interfaceMultipleDocumentInterfaceSWT
-
createEntryFromSkinRef
public abstract MdiEntry createEntryFromSkinRef(String parentEntryID, String id, String configID, String title, ViewTitleInfo titleInfo, Object params, boolean closeable, String preferedAfterID) Description copied from interface:MultipleDocumentInterfaceIf you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'- Specified by:
createEntryFromSkinRefin interfaceMultipleDocumentInterface- Parameters:
parentEntryID-id-configID-title-titleInfo-params-closeable-preferedAfterID-- Returns:
-
getSelectedEntry
- Specified by:
getSelectedEntryin interfaceMultipleDocumentInterface- Specified by:
getSelectedEntryin interfaceMultipleDocumentInterfaceSWT
-
setSelectedEntry
-
getEntries
- Specified by:
getEntriesin interfaceMultipleDocumentInterface- Specified by:
getEntriesin interfaceMultipleDocumentInterfaceSWT
-
getEntries
-
getEntry
- Specified by:
getEntryin interfaceMultipleDocumentInterface- Specified by:
getEntryin interfaceMultipleDocumentInterfaceSWT
-
getEntry
- Specified by:
getEntryin interfaceMultipleDocumentInterface
-
getEntryBySkinView
- Specified by:
getEntryBySkinViewin interfaceMultipleDocumentInterfaceSWT- Parameters:
skinView-- Returns:
- Since:
- 3.1.1.1
-
getUpdateUIName
Description copied from interface:UIUpdatableA name for this UIUpdatable so we can track who's being bad- Specified by:
getUpdateUINamein interfaceUIUpdatable- Returns:
- some name
-
registerEntry
- Specified by:
registerEntryin interfaceMultipleDocumentInterface
-
deregisterEntry
- Specified by:
deregisterEntryin interfaceMultipleDocumentInterface
-
createIfAutoOpen
-
canCreateEntryByCreationListener
-
createEntryByCreationListener
-
registerEntry
- Specified by:
registerEntryin interfaceMultipleDocumentInterface
-
deregisterEntry
- Specified by:
deregisterEntryin interfaceMultipleDocumentInterface
-
showEntryByID
- Specified by:
showEntryByIDin interfaceMultipleDocumentInterface
-
canShowEntryByID
-
showEntryByID
- Specified by:
showEntryByIDin interfaceMultipleDocumentInterface
-
popoutEntryByID
- Specified by:
popoutEntryByIDin interfaceMultipleDocumentInterface
-
popoutEntry
-
skinObjectInitialShow
- Specified by:
skinObjectInitialShowin classSkinView- Parameters:
skinObject-params-- Returns:
-
skinObjectDestroyed
Description copied from class:SWTSkinObjectAdapterSkin Object was destroyed- Overrides:
skinObjectDestroyedin classSkinView
-
updateUI
public void updateUI()Description copied from interface:UIUpdatableUpdate your UI!- Specified by:
updateUIin interfaceUIUpdatable
-
loadEntryByID
- Specified by:
loadEntryByIDin interfaceMultipleDocumentInterface
-
loadEntryByID
- Specified by:
loadEntryByIDin interfaceMultipleDocumentInterface
-
loadAndGetEntryByID
-
setEntryLoadedOnce
-
wasEntryLoadedOnce
-
entryExists
- Specified by:
entryExistsin interfaceMultipleDocumentInterface
-
setDefaultEntryID
- Specified by:
setDefaultEntryIDin interfaceMultipleDocumentInterface
-
setEntryAutoOpen
Description copied from interface:MultipleDocumentInterfaceWhen an entry can not be opened (ie. creation listener isn't registered yet), call this to store your open request- Specified by:
setEntryAutoOpenin interfaceMultipleDocumentInterface
-
removeEntryAutoOpen
- Specified by:
removeEntryAutoOpenin interfaceMultipleDocumentInterface
-
willEntryAutoOpen
- Specified by:
willEntryAutoOpenin interfaceMultipleDocumentInterface
-
autoOpenUpdated
private void autoOpenUpdated() -
setupPluginViews
protected void setupPluginViews() -
loadCloseables
private void loadCloseables() -
getShowIDAtStartup
-
saveCloseables
protected void saveCloseables() -
saveCloseables
private void saveCloseables(boolean interim) -
processAutoOpenMap
-
addItem
-
itemSelected
-
removeItem
- Specified by:
removeItemin interfaceMultipleDocumentInterface
-
removeItem
-
removeChildrenOf
-
getChildrenOf
- Specified by:
getChildrenOfin interfaceMultipleDocumentInterface
-
updateLanguage
Description copied from class:SWTSkinObjectAdapterskinObject needs to update any text- Overrides:
updateLanguagein classSWTSkinObjectAdapter
-
setPreferredOrder
- Specified by:
setPreferredOrderin interfaceMultipleDocumentInterface
-
getPreferredOrder
- Specified by:
getPreferredOrderin interfaceMultipleDocumentInterface
-
getEntriesCount
public int getEntriesCount()- Specified by:
getEntriesCountin interfaceMultipleDocumentInterface- Returns:
-
setCloseableConfigFile
- Specified by:
setCloseableConfigFilein interfaceMultipleDocumentInterfaceSWT- Parameters:
closeableConfigFile-
-
addListener
-
removeListener
-
getMenuHackListeners
-
fillMenu
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceMultipleDocumentInterface
-
getEntryFromSkinObject
-
getParentView
-
getViewID
- Specified by:
getViewIDin interfaceMultipleDocumentInterface
-
getDataSourceType
- Specified by:
getDataSourceTypein interfaceMultipleDocumentInterface
-