Package com.biglybt.ui.swt.mdi
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 String
static final String
static final String
private final Object
private TimerEvent
static final String
private String
private boolean
private MdiEntrySWT
private String
private String
private boolean
private String
private 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 boolean
private Map
<String, MdiEntryCreationListener> private Map
<String, MdiEntryCreationListener2> private final Map
<String, BaseMdiEntry> private final UISWTView
private final Class
<?> private String[]
private final String
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 TypeMethodDescriptionvoid
addItem
(BaseMdiEntry entry) void
void
void
private void
private boolean
boolean
final BaseMdiEntry
closeEntry
(MdiEntry entry, boolean userInitiated) CloseMdiEntry
final void
closeEntry
(String id) CloseMdiEntry
with id and remove from auto-open listcloseEntryByID
(String id) CloseMdiEntry
of idprotected BaseMdiEntry
closeEntryByID
(String id, boolean userInitiated) protected MdiEntry
createEntryByCreationListener
(String id, Map<?, ?> autoOpenInfo) 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);abstract MdiEntry
createEntryFromSkinRef
(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 boolean
void
void
boolean
entryExists
(String id) void
getChildrenOf
(String id) <T extends MdiEntry>
T[]getEntries
(T[] array) int
getEntryBySkinView
(Object skinView) static BaseMdiEntry
getEntryFromSkinObject
(PluginUISWTSkinObject pluginSkinObject) String[]
protected String
A name for this UIUpdatable so we can track who's being badboolean
protected void
itemSelected
(MdiEntry entry) private MdiEntry
loadAndGetEntryByID
(String id, boolean activate, boolean onlyLoadOnce, Object datasource) private void
boolean
loadEntryByID
(String id, boolean activate) boolean
loadEntryByID
(String id, boolean activate, boolean onlyLoadOnce, Object datasource) abstract boolean
popoutEntry
(MdiEntry entry, Map<String, Object> options) boolean
private boolean
processAutoOpenMap
(String id, Map<?, ?> autoOpenInfo, UISWTViewBuilderCore builder) void
void
private void
void
void
removeItem
(MdiEntry entry) protected void
removeItem
(MdiEntry entry, boolean removeChildren) void
void
void
protected void
private void
saveCloseables
(boolean interim) void
setCloseableConfigFile
(String closeableConfigFile) protected void
setCurrentEntry
(MdiEntrySWT entry) void
setDefaultEntryID
(String def) void
setEntryAutoOpen
(String id, Map autoOpenInfo) When an entry can not be opened (ie.protected abstract void
void
setPreferredOrder
(String[] preferredOrder) protected void
boolean
showEntryByID
(String id) boolean
showEntryByID
(String id, Object datasource) skinObjectDestroyed
(SWTSkinObject skinObject, Object params) Skin Object was destroyedskinObjectInitialShow
(SWTSkinObject skinObject, Object params) void
protected void
triggerSelectionListener
(MdiEntry newEntry, MdiEntry oldEntry) updateLanguage
(SWTSkinObject skinObject, Object params) skinObject needs to update any textvoid
updateUI()
Update your UI!protected abstract boolean
boolean
Methods inherited from class com.biglybt.ui.swt.views.skin.SkinView
getMainSkinObject, getMdiEntry, getSkin, getSkinObject, isDisposed, isVisible, setMainSkinObject, skinObjectCreated, 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
createHeader, isDisposed, isVisible, runWhenIdle, showEntry
Methods inherited from interface com.biglybt.ui.swt.mdi.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:
addListener
in interfaceMultipleDocumentInterface
-
removeListener
- Specified by:
removeListener
in interfaceMultipleDocumentInterface
-
addListener
- Specified by:
addListener
in interfaceMultipleDocumentInterface
-
removeListener
- Specified by:
removeListener
in interfaceMultipleDocumentInterface
-
triggerSelectionListener
-
triggerEntryLoadedListeners
-
closeEntry
Description copied from interface:MultipleDocumentInterface
CloseMdiEntry
with id and remove from auto-open list- Specified by:
closeEntry
in interfaceMultipleDocumentInterface
-
closeEntry
Description copied from interface:MultipleDocumentInterface
CloseMdiEntry
- Specified by:
closeEntry
in 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:MultipleDocumentInterface
CloseMdiEntry
of id- Specified by:
closeEntryByID
in 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:
createEntryFromEventListener
in 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:MultipleDocumentInterface
If you prefix the 'preferedAfterID' string with '~' then the operation will actually switch to 'preferedBeforeID'- Specified by:
createEntryFromSkinRef
in interfaceMultipleDocumentInterface
- Parameters:
parentEntryID
-id
-configID
-title
-titleInfo
-params
-closeable
-preferedAfterID
-- Returns:
-
getCurrentEntry
- Specified by:
getCurrentEntry
in interfaceMultipleDocumentInterface
- Specified by:
getCurrentEntry
in interfaceMultipleDocumentInterfaceSWT
-
setCurrentEntry
-
getEntries
- Specified by:
getEntries
in interfaceMultipleDocumentInterface
- Specified by:
getEntries
in interfaceMultipleDocumentInterfaceSWT
-
getEntries
-
getEntry
- Specified by:
getEntry
in interfaceMultipleDocumentInterface
- Specified by:
getEntry
in interfaceMultipleDocumentInterfaceSWT
-
getEntry
- Specified by:
getEntry
in interfaceMultipleDocumentInterface
-
getEntryBySkinView
- Specified by:
getEntryBySkinView
in interfaceMultipleDocumentInterfaceSWT
- Parameters:
skinView
-- Returns:
- Since:
- 3.1.1.1
-
getUpdateUIName
Description copied from interface:UIUpdatable
A name for this UIUpdatable so we can track who's being bad- Specified by:
getUpdateUIName
in interfaceUIUpdatable
- Returns:
- some name
-
registerEntry
- Specified by:
registerEntry
in interfaceMultipleDocumentInterface
-
deregisterEntry
- Specified by:
deregisterEntry
in interfaceMultipleDocumentInterface
-
createIfAutoOpen
-
canCreateEntryByCreationListener
-
createEntryByCreationListener
-
registerEntry
- Specified by:
registerEntry
in interfaceMultipleDocumentInterface
-
deregisterEntry
- Specified by:
deregisterEntry
in interfaceMultipleDocumentInterface
-
showEntryByID
- Specified by:
showEntryByID
in interfaceMultipleDocumentInterface
-
canShowEntryByID
-
showEntryByID
- Specified by:
showEntryByID
in interfaceMultipleDocumentInterface
-
popoutEntryByID
- Specified by:
popoutEntryByID
in interfaceMultipleDocumentInterface
-
popoutEntry
-
skinObjectInitialShow
- Specified by:
skinObjectInitialShow
in classSkinView
- Parameters:
skinObject
-params
-- Returns:
-
skinObjectDestroyed
Description copied from class:SWTSkinObjectAdapter
Skin Object was destroyed- Overrides:
skinObjectDestroyed
in classSkinView
-
updateUI
public void updateUI()Description copied from interface:UIUpdatable
Update your UI!- Specified by:
updateUI
in interfaceUIUpdatable
-
loadEntryByID
- Specified by:
loadEntryByID
in interfaceMultipleDocumentInterface
-
loadEntryByID
- Specified by:
loadEntryByID
in interfaceMultipleDocumentInterface
-
loadAndGetEntryByID
-
setEntryLoadedOnce
-
wasEntryLoadedOnce
-
entryExists
- Specified by:
entryExists
in interfaceMultipleDocumentInterface
-
setDefaultEntryID
- Specified by:
setDefaultEntryID
in interfaceMultipleDocumentInterface
-
setEntryAutoOpen
Description copied from interface:MultipleDocumentInterface
When an entry can not be opened (ie. creation listener isn't registered yet), call this to store your open request- Specified by:
setEntryAutoOpen
in interfaceMultipleDocumentInterface
-
removeEntryAutoOpen
- Specified by:
removeEntryAutoOpen
in interfaceMultipleDocumentInterface
-
willEntryAutoOpen
- Specified by:
willEntryAutoOpen
in 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:
removeItem
in interfaceMultipleDocumentInterface
-
removeItem
-
removeChildrenOf
-
getChildrenOf
- Specified by:
getChildrenOf
in interfaceMultipleDocumentInterface
-
updateLanguage
Description copied from class:SWTSkinObjectAdapter
skinObject needs to update any text- Overrides:
updateLanguage
in classSWTSkinObjectAdapter
-
setPreferredOrder
- Specified by:
setPreferredOrder
in interfaceMultipleDocumentInterface
-
getPreferredOrder
- Specified by:
getPreferredOrder
in interfaceMultipleDocumentInterface
-
getEntriesCount
public int getEntriesCount()- Specified by:
getEntriesCount
in interfaceMultipleDocumentInterface
- Returns:
-
setCloseableConfigFile
- Specified by:
setCloseableConfigFile
in interfaceMultipleDocumentInterfaceSWT
- Parameters:
closeableConfigFile
-
-
addListener
-
removeListener
-
getMenuHackListeners
-
fillMenu
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceMultipleDocumentInterface
-
getEntryFromSkinObject
-
getParentView
-
getViewID
- Specified by:
getViewID
in interfaceMultipleDocumentInterface
-
getDataSourceType
- Specified by:
getDataSourceType
in interfaceMultipleDocumentInterface
-