com.aelitis.azureus.ui.swt.mdi
Class BaseMDI
java.lang.Object
com.aelitis.azureus.ui.swt.skin.SWTSkinObjectAdapter
com.aelitis.azureus.ui.swt.views.skin.SkinView
com.aelitis.azureus.ui.swt.mdi.BaseMDI
- All Implemented Interfaces:
- UIUpdatable, MultipleDocumentInterface, MultipleDocumentInterfaceSWT, SWTSkinObjectListener
- Direct Known Subclasses:
- SideBar, TabbedMDI
public abstract class BaseMDI
- extends SkinView
- implements MultipleDocumentInterfaceSWT, UIUpdatable
Fields inherited from interface com.aelitis.azureus.ui.mdi.MultipleDocumentInterface |
SIDEBAR_HEADER_DEVICES, SIDEBAR_HEADER_DISCOVERY, SIDEBAR_HEADER_DVD, SIDEBAR_HEADER_PLUGINS, SIDEBAR_HEADER_TRANSFERS, SIDEBAR_HEADER_VUZE, SIDEBAR_POS_FIRST, SIDEBAR_SECTION_ABOUTPLUGINS, SIDEBAR_SECTION_ACTIVITIES, SIDEBAR_SECTION_ALLPEERS, SIDEBAR_SECTION_ARCHIVED_DOWNLOADS, SIDEBAR_SECTION_BETAPROGRAM, SIDEBAR_SECTION_BURN_INFO, SIDEBAR_SECTION_CHAT, SIDEBAR_SECTION_CLIENT_STATS, SIDEBAR_SECTION_CONFIG, SIDEBAR_SECTION_DEVICES, SIDEBAR_SECTION_DOWNLOAD_HISTORY, SIDEBAR_SECTION_GAMES, SIDEBAR_SECTION_LIBRARY, SIDEBAR_SECTION_LIBRARY_CD, SIDEBAR_SECTION_LIBRARY_DL, SIDEBAR_SECTION_LIBRARY_UNOPENED, SIDEBAR_SECTION_LOGGER, SIDEBAR_SECTION_MY_SHARES, SIDEBAR_SECTION_MY_TRACKER, SIDEBAR_SECTION_PLUGINS, SIDEBAR_SECTION_PLUS, SIDEBAR_SECTION_SEARCH, SIDEBAR_SECTION_SUBSCRIPTIONS, SIDEBAR_SECTION_TAG_DISCOVERY, SIDEBAR_SECTION_TAGS, SIDEBAR_SECTION_TORRENT_DETAILS, SIDEBAR_SECTION_TORRENT_OPTIONS, SIDEBAR_SECTION_WELCOME |
Method Summary |
void |
addItem(MdiEntry entry)
|
void |
addListener(MdiEntryLoadedListener l)
|
void |
addListener(MdiListener l)
|
void |
addListener(MdiSWTMenuHackListener l)
|
void |
closeEntry(java.lang.String id)
|
protected MdiEntry |
createEntryByCreationListener(java.lang.String id,
java.lang.Object ds,
java.util.Map<?,?> autoOpenMap)
|
MdiEntry |
createEntryFromEventListener(java.lang.String parentID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.String id,
boolean closeable,
java.lang.Object data,
java.lang.String preferedAfterID)
|
abstract MdiEntry |
createEntryFromEventListener(java.lang.String parentEntryID,
java.lang.String parentViewID,
UISWTViewEventListener l,
java.lang.String id,
boolean closeable,
java.lang.Object datasource,
java.lang.String preferredAfterID)
|
MdiEntry |
createEntryFromEventListener(java.lang.String parentID,
UISWTViewEventListener l,
java.lang.String id,
boolean closeable,
java.lang.Object datasource,
java.lang.String preferedAfterID)
If you prefix the 'preferedAfterID' string with '~' then the operation will actually
switch to 'preferedBeforeID' |
abstract MdiEntry |
createEntryFromSkinRef(java.lang.String parentID,
java.lang.String id,
java.lang.String configID,
java.lang.String title,
ViewTitleInfo titleInfo,
java.lang.Object params,
boolean closeable,
java.lang.String preferedAfterID)
If you prefix the 'preferedAfterID' string with '~' then the operation will actually
switch to 'preferedBeforeID' |
void |
deregisterEntry(java.lang.String id,
MdiEntryCreationListener l)
|
void |
deregisterEntry(java.lang.String id,
MdiEntryCreationListener2 l)
|
boolean |
entryExists(java.lang.String id)
|
void |
fillMenu(org.eclipse.swt.widgets.Menu menu,
MdiEntry entry,
java.lang.String menuID)
|
java.util.List<MdiEntry> |
getChildrenOf(java.lang.String id)
|
UISWTViewCore |
getCoreViewFromID(java.lang.String id)
|
MdiEntry |
getCurrentEntry()
|
MdiEntrySWT |
getCurrentEntrySWT()
|
MdiEntry[] |
getEntries()
|
|
getEntries(T[] array)
|
int |
getEntriesCount()
|
MdiEntrySWT[] |
getEntriesSWT()
|
MdiEntry |
getEntry(java.lang.String id)
|
MdiEntry |
getEntryBySkinView(java.lang.Object skinView)
|
MdiEntrySWT |
getEntrySWT(java.lang.String id)
|
MdiSWTMenuHackListener[] |
getMenuHackListeners()
|
java.lang.String[] |
getPreferredOrder()
|
java.lang.String |
getUpdateUIName()
A name for this UIUpdatable so we can track who's being bad |
void |
informAutoOpenSet(MdiEntry entry,
java.util.Map<java.lang.String,java.lang.Object> autoOpenInfo)
|
protected void |
itemSelected(MdiEntry entry)
|
void |
loadCloseables()
|
boolean |
loadEntryByID(java.lang.String id,
boolean activate)
|
boolean |
loadEntryByID(java.lang.String id,
boolean activate,
boolean onlyLoadOnce,
java.lang.Object datasource)
|
void |
registerEntry(java.lang.String id,
MdiEntryCreationListener l)
|
void |
registerEntry(java.lang.String id,
MdiEntryCreationListener2 l)
|
void |
removeEntryAutoOpen(java.lang.String id)
|
void |
removeItem(MdiEntry entry)
|
void |
removeListener(MdiEntryLoadedListener l)
|
void |
removeListener(MdiListener l)
|
void |
removeListener(MdiSWTMenuHackListener l)
|
void |
saveCloseables()
|
void |
setCloseableConfigFile(java.lang.String closeableConfigFile)
|
void |
setEntryAutoOpen(java.lang.String id,
java.lang.Object datasource)
When an entry can not be opened (ie. |
protected abstract void |
setEntryLoadedOnce(java.lang.String id)
|
void |
setPreferredOrder(java.lang.String[] preferredOrder)
|
protected void |
setupPluginViews()
|
boolean |
showEntryByID(java.lang.String id)
|
boolean |
showEntryByID(java.lang.String id,
java.lang.Object datasource)
|
java.lang.Object |
skinObjectDestroyed(SWTSkinObject skinObject,
java.lang.Object params)
Skin Object was destroyed |
java.lang.Object |
skinObjectInitialShow(SWTSkinObject skinObject,
java.lang.Object params)
|
void |
triggerEntryLoadedListeners(MdiEntry entry)
|
protected void |
triggerSelectionListener(MdiEntry newEntry,
MdiEntry oldEntry)
|
java.lang.Object |
updateLanguage(SWTSkinObject skinObject,
java.lang.Object params)
skinObject needs to update any text |
void |
updateUI()
Update your UI! |
protected abstract boolean |
wasEntryLoadedOnce(java.lang.String id)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentEntry
protected MdiEntrySWT currentEntry
BaseMDI
public BaseMDI()
addListener
public void addListener(MdiListener l)
- Specified by:
addListener
in interface MultipleDocumentInterface
removeListener
public void removeListener(MdiListener l)
- Specified by:
removeListener
in interface MultipleDocumentInterface
addListener
public void addListener(MdiEntryLoadedListener l)
- Specified by:
addListener
in interface MultipleDocumentInterface
removeListener
public void removeListener(MdiEntryLoadedListener l)
- Specified by:
removeListener
in interface MultipleDocumentInterface
triggerSelectionListener
protected void triggerSelectionListener(MdiEntry newEntry,
MdiEntry oldEntry)
triggerEntryLoadedListeners
public void triggerEntryLoadedListeners(MdiEntry entry)
closeEntry
public void closeEntry(java.lang.String id)
- Specified by:
closeEntry
in interface MultipleDocumentInterface
createEntryFromEventListener
public final MdiEntry createEntryFromEventListener(java.lang.String parentID,
UISWTViewEventListener l,
java.lang.String id,
boolean closeable,
java.lang.Object datasource,
java.lang.String preferedAfterID)
- Description copied from interface:
MultipleDocumentInterfaceSWT
- If you prefix the 'preferedAfterID' string with '~' then the operation will actually
switch to 'preferedBeforeID'
- Specified by:
createEntryFromEventListener
in interface MultipleDocumentInterfaceSWT
createEntryFromEventListener
public abstract MdiEntry createEntryFromEventListener(java.lang.String parentEntryID,
java.lang.String parentViewID,
UISWTViewEventListener l,
java.lang.String id,
boolean closeable,
java.lang.Object datasource,
java.lang.String preferredAfterID)
- Specified by:
createEntryFromEventListener
in interface MultipleDocumentInterfaceSWT
createEntryFromSkinRef
public abstract MdiEntry createEntryFromSkinRef(java.lang.String parentID,
java.lang.String id,
java.lang.String configID,
java.lang.String title,
ViewTitleInfo titleInfo,
java.lang.Object params,
boolean closeable,
java.lang.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 interface MultipleDocumentInterface
- Returns:
createEntryFromEventListener
public MdiEntry createEntryFromEventListener(java.lang.String parentID,
java.lang.Class<? extends UISWTViewEventListener> cla,
java.lang.String id,
boolean closeable,
java.lang.Object data,
java.lang.String preferedAfterID)
- Specified by:
createEntryFromEventListener
in interface MultipleDocumentInterfaceSWT
getCurrentEntry
public MdiEntry getCurrentEntry()
- Specified by:
getCurrentEntry
in interface MultipleDocumentInterface
getCurrentEntrySWT
public MdiEntrySWT getCurrentEntrySWT()
- Specified by:
getCurrentEntrySWT
in interface MultipleDocumentInterfaceSWT
getEntries
public MdiEntry[] getEntries()
- Specified by:
getEntries
in interface MultipleDocumentInterface
getEntriesSWT
public MdiEntrySWT[] getEntriesSWT()
getEntries
public <T extends MdiEntry> T[] getEntries(T[] array)
getEntry
public MdiEntry getEntry(java.lang.String id)
- Specified by:
getEntry
in interface MultipleDocumentInterface
getEntrySWT
public MdiEntrySWT getEntrySWT(java.lang.String id)
- Specified by:
getEntrySWT
in interface MultipleDocumentInterfaceSWT
getEntryBySkinView
public MdiEntry getEntryBySkinView(java.lang.Object skinView)
- Specified by:
getEntryBySkinView
in interface MultipleDocumentInterfaceSWT
- Parameters:
skinView
-
- Returns:
- Since:
- 3.1.1.1
getCoreViewFromID
public UISWTViewCore getCoreViewFromID(java.lang.String id)
- Specified by:
getCoreViewFromID
in interface MultipleDocumentInterfaceSWT
getUpdateUIName
public java.lang.String getUpdateUIName()
- Description copied from interface:
UIUpdatable
- A name for this UIUpdatable so we can track who's being bad
- Specified by:
getUpdateUIName
in interface UIUpdatable
- Returns:
- some name
registerEntry
public void registerEntry(java.lang.String id,
MdiEntryCreationListener2 l)
- Specified by:
registerEntry
in interface MultipleDocumentInterface
deregisterEntry
public void deregisterEntry(java.lang.String id,
MdiEntryCreationListener2 l)
- Specified by:
deregisterEntry
in interface MultipleDocumentInterface
createEntryByCreationListener
protected MdiEntry createEntryByCreationListener(java.lang.String id,
java.lang.Object ds,
java.util.Map<?,?> autoOpenMap)
registerEntry
public void registerEntry(java.lang.String id,
MdiEntryCreationListener l)
- Specified by:
registerEntry
in interface MultipleDocumentInterface
deregisterEntry
public void deregisterEntry(java.lang.String id,
MdiEntryCreationListener l)
- Specified by:
deregisterEntry
in interface MultipleDocumentInterface
showEntryByID
public boolean showEntryByID(java.lang.String id)
- Specified by:
showEntryByID
in interface MultipleDocumentInterface
showEntryByID
public boolean showEntryByID(java.lang.String id,
java.lang.Object datasource)
- Specified by:
showEntryByID
in interface MultipleDocumentInterface
skinObjectInitialShow
public java.lang.Object skinObjectInitialShow(SWTSkinObject skinObject,
java.lang.Object params)
- Specified by:
skinObjectInitialShow
in class SkinView
- Returns:
skinObjectDestroyed
public java.lang.Object skinObjectDestroyed(SWTSkinObject skinObject,
java.lang.Object params)
- Description copied from class:
SWTSkinObjectAdapter
- Skin Object was destroyed
- Overrides:
skinObjectDestroyed
in class SkinView
updateUI
public void updateUI()
- Description copied from interface:
UIUpdatable
- Update your UI!
- Specified by:
updateUI
in interface UIUpdatable
loadEntryByID
public boolean loadEntryByID(java.lang.String id,
boolean activate)
- Specified by:
loadEntryByID
in interface MultipleDocumentInterface
loadEntryByID
public boolean loadEntryByID(java.lang.String id,
boolean activate,
boolean onlyLoadOnce,
java.lang.Object datasource)
- Specified by:
loadEntryByID
in interface MultipleDocumentInterface
setEntryLoadedOnce
protected abstract void setEntryLoadedOnce(java.lang.String id)
wasEntryLoadedOnce
protected abstract boolean wasEntryLoadedOnce(java.lang.String id)
entryExists
public boolean entryExists(java.lang.String id)
- Specified by:
entryExists
in interface MultipleDocumentInterface
setEntryAutoOpen
public void setEntryAutoOpen(java.lang.String id,
java.lang.Object datasource)
- 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 interface MultipleDocumentInterface
removeEntryAutoOpen
public void removeEntryAutoOpen(java.lang.String id)
- Specified by:
removeEntryAutoOpen
in interface MultipleDocumentInterface
setupPluginViews
protected void setupPluginViews()
informAutoOpenSet
public void informAutoOpenSet(MdiEntry entry,
java.util.Map<java.lang.String,java.lang.Object> autoOpenInfo)
- Specified by:
informAutoOpenSet
in interface MultipleDocumentInterface
loadCloseables
public void loadCloseables()
saveCloseables
public void saveCloseables()
addItem
public void addItem(MdiEntry entry)
itemSelected
protected void itemSelected(MdiEntry entry)
removeItem
public void removeItem(MdiEntry entry)
- Specified by:
removeItem
in interface MultipleDocumentInterface
getChildrenOf
public java.util.List<MdiEntry> getChildrenOf(java.lang.String id)
- Specified by:
getChildrenOf
in interface MultipleDocumentInterface
updateLanguage
public java.lang.Object updateLanguage(SWTSkinObject skinObject,
java.lang.Object params)
- Description copied from class:
SWTSkinObjectAdapter
- skinObject needs to update any text
- Overrides:
updateLanguage
in class SWTSkinObjectAdapter
setPreferredOrder
public void setPreferredOrder(java.lang.String[] preferredOrder)
- Specified by:
setPreferredOrder
in interface MultipleDocumentInterface
getPreferredOrder
public java.lang.String[] getPreferredOrder()
- Specified by:
getPreferredOrder
in interface MultipleDocumentInterface
getEntriesCount
public int getEntriesCount()
- Specified by:
getEntriesCount
in interface MultipleDocumentInterface
- Returns:
setCloseableConfigFile
public void setCloseableConfigFile(java.lang.String closeableConfigFile)
- Specified by:
setCloseableConfigFile
in interface MultipleDocumentInterfaceSWT
addListener
public void addListener(MdiSWTMenuHackListener l)
removeListener
public void removeListener(MdiSWTMenuHackListener l)
getMenuHackListeners
public MdiSWTMenuHackListener[] getMenuHackListeners()
fillMenu
public void fillMenu(org.eclipse.swt.widgets.Menu menu,
MdiEntry entry,
java.lang.String menuID)