com.aelitis.azureus.ui.swt.mdi
Class BaseMdiEntry

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewImpl
      extended by com.aelitis.azureus.ui.swt.mdi.BaseMdiEntry
All Implemented Interfaces:
ViewTitleInfoListener, MdiEntry, MdiEntrySWT, AEDiagnosticsEvidenceGenerator, UIToolBarActivationListener, UIToolBarEnablerBase, UIPluginView, UIPluginViewToolBarListener, ObfusticateImage, UISWTView, UISWTViewCore
Direct Known Subclasses:
SideBarEntrySWT, TabbedEntry

public abstract class BaseMdiEntry
extends UISWTViewImpl
implements MdiEntrySWT, ViewTitleInfoListener, AEDiagnosticsEvidenceGenerator, ObfusticateImage


Field Summary
protected  String logID
           
protected  MultipleDocumentInterface mdi
           
protected  ViewTitleInfo viewTitleInfo
           
 
Fields inherited from class org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewImpl
CFG_PREFIX, composite, datasource, id, skinObject
 
Fields inherited from interface org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewCore
CONTROLTYPE_SKINOBJECT
 
Fields inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTView
CONTROLTYPE_AWT, CONTROLTYPE_SWT
 
Fields inherited from interface org.gudy.azureus2.plugins.ui.toolbar.UIToolBarActivationListener
ACTIVATIONTYPE_HELD, ACTIVATIONTYPE_NORMAL, ACTIVATIONTYPE_RIGHTCLICK
 
Constructor Summary
BaseMdiEntry(MultipleDocumentInterface mdi, String id, String parentViewID)
           
 
Method Summary
 void addListener(MdiChildCloseListener l)
           
 void addListener(MdiCloseListener l)
           
 void addListener(MdiEntryDatasourceListener l)
           
 void addListener(MdiEntryDropListener l)
           
 void addListener(MdiEntryLogIdListener l)
           
 void addListener(MdiEntryOpenListener l)
           
 void addListener(MdiSWTMenuHackListener l)
           
 void addListeners(Object objectWithListeners)
           
 MdiEntryVitalityImage addVitalityImage(String imageID)
           
 void build()
           
 boolean close(boolean forceClose)
           
 void closeView()
          Closes the view
 void generate(IndentWriter writer)
           
 Map<String,Object> getAutoOpenInfo()
           
 Object getDatasource()
           
 Object getDatasourceCore()
           
 String getExportableDatasource()
           
 String getId()
           
 org.eclipse.swt.graphics.Image getImageLeft(String suffix)
           
 String getImageLeftID()
           
 String getLogID()
           
 MultipleDocumentInterface getMDI()
           
 MdiSWTMenuHackListener[] getMenuHackListeners()
           
 String getParentID()
           
 String getPreferredAfterID()
           
 SWTSkinObject getSkinObject()
           
 SWTSkinObject getSkinObjectMaster()
           
 String getSkinRef()
           
 String getTitle()
           
 ViewTitleInfo getViewTitleInfo()
           
 MdiEntryVitalityImage[] getVitalityImages()
           
 boolean hasDropListeners()
           
 void hide()
           
 boolean isAdded()
           
 boolean isCloseable()
           
 boolean isCollapseDisabled()
           
 boolean isDisposed()
           
 boolean isExpanded()
           
 void releaseImageLeft(String suffix)
           
 void removeListener(MdiChildCloseListener l)
           
 void removeListener(MdiCloseListener l)
           
 void removeListener(MdiEntryDatasourceListener l)
           
 void removeListener(MdiEntryDropListener l)
           
 void removeListener(MdiEntryLogIdListener sideBarLogIdListener)
           
 void removeListener(MdiEntryOpenListener l)
           
 void removeListener(MdiSWTMenuHackListener l)
           
 void requestAttention()
           
 boolean requestClose()
           
 void setCloseable(boolean closeable)
           
 void setCollapseDisabled(boolean collapseDisabled)
           
 void setDatasource(Object datasource)
           
 void setDefaultExpanded(boolean defaultExpanded)
           
 void setDisposed(boolean b)
           
 void setEventListener(UISWTViewEventListener _eventListener, boolean doCreate)
           
 void setExpanded(boolean expanded)
           
 void setImageLeft(org.eclipse.swt.graphics.Image imageLeft)
           
 void setImageLeftID(String id)
           
 void setLogID(String logID)
           
 void setParentID(String id)
           
 void setPluginSkinObject(PluginUISWTSkinObject skinObject)
           
 void setPreferredAfterID(String preferredAfterID)
           
 void setSkinObjectMaster(SWTSkinObject soMaster)
           
 void setSkinRef(String configID, Object params)
           
 void setTitle(String title)
          Override the default title with a new one.
 void setViewTitleInfo(ViewTitleInfo viewTitleInfo)
           
 void show()
           
protected  void swt_hide()
           
 void triggerChildCloseListeners(MdiEntry child, boolean user)
           
 void triggerCloseListeners(boolean user)
           
 void triggerDatasourceListeners()
           
 boolean triggerDropListeners(Object o)
           
 void triggerEvent(int eventType, Object data)
          Trigger an event for this view
protected  void triggerLogIDListeners(String oldID)
           
 void triggerOpenListeners()
           
 void updateLanguage()
           
 void updateUI()
           
 void viewTitleInfoRefresh(ViewTitleInfo titleInfoToRefresh)
           
 
Methods inherited from class org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewImpl
addToolbarEnabler, getComposite, getControlType, getDataSource, getEventListener, getFullTitle, getInitialDataSource, getParentView, getPluginInterface, getPluginSkinObject, getTitleID, getToolbarEnablers, getToolBarListener, getUserData, getViewID, hasToolbarEnableers, initialize, isDelayInitializeToFirstActivate, isDestroyOnDeactivate, refreshTitle, refreshToolBarItems, removeToolbarEnabler, setControlType, setDelayInitializeToFirstActivate, setDestroyOnDeactivate, setParentView, setTitleID, setToolBarListener, setToolbarVisibility, setUseCoreDataSource, setUserData, toolBarItemActivated, triggerEventRaw, useCoreDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aelitis.azureus.ui.swt.mdi.MdiEntrySWT
getEventListener
 
Methods inherited from interface com.aelitis.azureus.ui.mdi.MdiEntry
addToolbarEnabler, expandTo, getToolbarEnablers, getUserData, isSelectable, redraw, removeToolbarEnabler, setSelectable, setTitleID, setUserData
 
Methods inherited from interface org.gudy.azureus2.ui.swt.pluginsimpl.UISWTViewCore
getComposite, getFullTitle, getPluginSkinObject, getTitleID, getUserData, initialize, setParentView, setUseCoreDataSource, setUserData, useCoreDataSource
 
Methods inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTView
getControlType, getDataSource, getInitialDataSource, getParentView, getPluginInterface, isDestroyOnDeactivate, setControlType, setDestroyOnDeactivate
 
Methods inherited from interface org.gudy.azureus2.plugins.ui.UIPluginView
getToolBarListener, getViewID, setToolBarListener
 
Methods inherited from interface org.gudy.azureus2.ui.swt.debug.ObfusticateImage
obfusticatedImage
 

Field Detail

mdi

protected final MultipleDocumentInterface mdi

logID

protected String logID

viewTitleInfo

protected ViewTitleInfo viewTitleInfo
Constructor Detail

BaseMdiEntry

public BaseMdiEntry(MultipleDocumentInterface mdi,
                    String id,
                    String parentViewID)
Method Detail

getId

public String getId()
Specified by:
getId in interface MdiEntry

addVitalityImage

public MdiEntryVitalityImage addVitalityImage(String imageID)
Specified by:
addVitalityImage in interface MdiEntry

close

public boolean close(boolean forceClose)
Specified by:
close in interface MdiEntry

getDatasourceCore

public Object getDatasourceCore()

getExportableDatasource

public String getExportableDatasource()
Specified by:
getExportableDatasource in interface MdiEntry

getDatasource

public Object getDatasource()
Specified by:
getDatasource in interface MdiEntry

getLogID

public String getLogID()
Specified by:
getLogID in interface MdiEntry

getMDI

public MultipleDocumentInterface getMDI()
Specified by:
getMDI in interface MdiEntry

getParentID

public String getParentID()
Specified by:
getParentID in interface MdiEntry

setParentID

public void setParentID(String id)
Specified by:
setParentID in interface MdiEntry

getVitalityImages

public MdiEntryVitalityImage[] getVitalityImages()
Specified by:
getVitalityImages in interface MdiEntry

isCloseable

public boolean isCloseable()
Specified by:
isCloseable in interface MdiEntry

isCollapseDisabled

public boolean isCollapseDisabled()

setCollapseDisabled

public void setCollapseDisabled(boolean collapseDisabled)
Specified by:
setCollapseDisabled in interface MdiEntry

addListeners

public void addListeners(Object objectWithListeners)
Specified by:
addListeners in interface MdiEntry

addListener

public void addListener(MdiCloseListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiCloseListener l)
Specified by:
removeListener in interface MdiEntry

triggerCloseListeners

public void triggerCloseListeners(boolean user)

addListener

public void addListener(MdiChildCloseListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiChildCloseListener l)
Specified by:
removeListener in interface MdiEntry

triggerChildCloseListeners

public void triggerChildCloseListeners(MdiEntry child,
                                       boolean user)

addListener

public void addListener(MdiEntryLogIdListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiEntryLogIdListener sideBarLogIdListener)
Specified by:
removeListener in interface MdiEntry

triggerLogIDListeners

protected void triggerLogIDListeners(String oldID)

addListener

public void addListener(MdiEntryOpenListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiEntryOpenListener l)
Specified by:
removeListener in interface MdiEntry

triggerOpenListeners

public void triggerOpenListeners()

addListener

public void addListener(MdiEntryDatasourceListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiEntryDatasourceListener l)
Specified by:
removeListener in interface MdiEntry

triggerDatasourceListeners

public void triggerDatasourceListeners()

addListener

public void addListener(MdiEntryDropListener l)
Specified by:
addListener in interface MdiEntry

removeListener

public void removeListener(MdiEntryDropListener l)
Specified by:
removeListener in interface MdiEntry

hasDropListeners

public boolean hasDropListeners()

triggerDropListeners

public boolean triggerDropListeners(Object o)
Parameters:
o -
Returns:
true: handled; false: not handled

setLogID

public void setLogID(String logID)
Specified by:
setLogID in interface MdiEntry

getViewTitleInfo

public ViewTitleInfo getViewTitleInfo()
Specified by:
getViewTitleInfo in interface MdiEntry

setViewTitleInfo

public void setViewTitleInfo(ViewTitleInfo viewTitleInfo)
Specified by:
setViewTitleInfo in interface MdiEntry

setPluginSkinObject

public void setPluginSkinObject(PluginUISWTSkinObject skinObject)
Specified by:
setPluginSkinObject in interface UISWTViewCore
Overrides:
setPluginSkinObject in class UISWTViewImpl

setSkinObjectMaster

public void setSkinObjectMaster(SWTSkinObject soMaster)

getSkinObject

public SWTSkinObject getSkinObject()

getSkinObjectMaster

public SWTSkinObject getSkinObjectMaster()

setSkinRef

public void setSkinRef(String configID,
                       Object params)

getSkinRef

public String getSkinRef()

getTitle

public String getTitle()
Specified by:
getTitle in interface MdiEntry

updateLanguage

public void updateLanguage()

triggerEvent

public void triggerEvent(int eventType,
                         Object data)
Description copied from interface: UISWTView
Trigger an event for this view

Specified by:
triggerEvent in interface UISWTView
Overrides:
triggerEvent in class UISWTViewImpl
Parameters:
eventType - Event to trigger UISWTViewEvent}
data - data to send with trigger

show

public void show()

hide

public void hide()
Specified by:
hide in interface MdiEntry

requestAttention

public void requestAttention()
Specified by:
requestAttention in interface MdiEntry

swt_hide

protected void swt_hide()

updateUI

public void updateUI()
Specified by:
updateUI in interface MdiEntry

isDisposed

public boolean isDisposed()
Specified by:
isDisposed in interface MdiEntry

getAutoOpenInfo

public Map<String,Object> getAutoOpenInfo()
Specified by:
getAutoOpenInfo in interface MdiEntry

setCloseable

public void setCloseable(boolean closeable)

setDefaultExpanded

public void setDefaultExpanded(boolean defaultExpanded)
Specified by:
setDefaultExpanded in interface MdiEntry

isExpanded

public boolean isExpanded()
Specified by:
isExpanded in interface MdiEntry

setExpanded

public void setExpanded(boolean expanded)
Specified by:
setExpanded in interface MdiEntry

isAdded

public boolean isAdded()
Specified by:
isAdded in interface MdiEntry

setDisposed

public void setDisposed(boolean b)

setImageLeftID

public void setImageLeftID(String id)
Specified by:
setImageLeftID in interface MdiEntry

getImageLeftID

public String getImageLeftID()
Specified by:
getImageLeftID in interface MdiEntry

setImageLeft

public void setImageLeft(org.eclipse.swt.graphics.Image imageLeft)
Specified by:
setImageLeft in interface MdiEntrySWT
Parameters:
imageLeft - the imageLeft to set

getImageLeft

public org.eclipse.swt.graphics.Image getImageLeft(String suffix)

releaseImageLeft

public void releaseImageLeft(String suffix)

viewTitleInfoRefresh

public void viewTitleInfoRefresh(ViewTitleInfo titleInfoToRefresh)
Specified by:
viewTitleInfoRefresh in interface ViewTitleInfoListener

build

public void build()

setPreferredAfterID

public void setPreferredAfterID(String preferredAfterID)
Specified by:
setPreferredAfterID in interface MdiEntry

getPreferredAfterID

public String getPreferredAfterID()
Specified by:
getPreferredAfterID in interface MdiEntry

requestClose

public boolean requestClose()

generate

public void generate(IndentWriter writer)
Specified by:
generate in interface AEDiagnosticsEvidenceGenerator

closeView

public void closeView()
Description copied from interface: UIPluginView
Closes the view

Specified by:
closeView in interface UIPluginView
Overrides:
closeView in class UISWTViewImpl

setEventListener

public void setEventListener(UISWTViewEventListener _eventListener,
                             boolean doCreate)
                      throws UISWTViewEventCancelledException
Overrides:
setEventListener in class UISWTViewImpl
Throws:
UISWTViewEventCancelledException

setDatasource

public void setDatasource(Object datasource)
Specified by:
setDatasource in interface MdiEntry
Overrides:
setDatasource in class UISWTViewImpl

setTitle

public void setTitle(String title)
Description copied from interface: UISWTView
Override the default title with a new one. After setting this, you should use the UISWTViewEvent.TYPE_LANGUAGEUPDATE to update your title to the new language.

Specified by:
setTitle in interface MdiEntry
Specified by:
setTitle in interface UISWTView
Overrides:
setTitle in class UISWTViewImpl
Parameters:
title - new Title

addListener

public void addListener(MdiSWTMenuHackListener l)
Specified by:
addListener in interface MdiEntrySWT

removeListener

public void removeListener(MdiSWTMenuHackListener l)
Specified by:
removeListener in interface MdiEntrySWT

getMenuHackListeners

public MdiSWTMenuHackListener[] getMenuHackListeners()