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  java.lang.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, java.lang.String id, java.lang.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(java.lang.Object objectWithListeners)
           
 MdiEntryVitalityImage addVitalityImage(java.lang.String imageID)
           
 void build()
           
 boolean close(boolean forceClose)
           
 void closeView()
          Closes the view
 void generate(IndentWriter writer)
           
 java.util.Map<java.lang.String,java.lang.Object> getAutoOpenInfo()
           
 java.lang.Object getDatasource()
           
 java.lang.Object getDatasourceCore()
           
 java.lang.String getExportableDatasource()
           
 java.lang.String getId()
           
 org.eclipse.swt.graphics.Image getImageLeft(java.lang.String suffix)
           
 java.lang.String getImageLeftID()
           
 java.lang.String getLogID()
           
 MultipleDocumentInterface getMDI()
           
 MdiSWTMenuHackListener[] getMenuHackListeners()
           
 java.lang.String getParentID()
           
 java.lang.String getPreferredAfterID()
           
 SWTSkinObject getSkinObject()
           
 SWTSkinObject getSkinObjectMaster()
           
 java.lang.String getSkinRef()
           
 java.lang.String getTitle()
           
 ViewTitleInfo getViewTitleInfo()
           
 MdiEntryVitalityImage[] getVitalityImages()
           
 boolean hasDropListeners()
           
 void hide()
           
 boolean isAdded()
           
 boolean isCloseable()
           
 boolean isCollapseDisabled()
           
 boolean isDisposed()
           
 boolean isExpanded()
           
 void releaseImageLeft(java.lang.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(java.lang.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(java.lang.String id)
           
 void setLogID(java.lang.String logID)
           
 void setParentID(java.lang.String id)
           
 void setPluginSkinObject(PluginUISWTSkinObject skinObject)
           
 void setPreferredAfterID(java.lang.String preferredAfterID)
           
 void setSkinObjectMaster(SWTSkinObject soMaster)
           
 void setSkinRef(java.lang.String configID, java.lang.Object params)
           
 void setTitle(java.lang.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(java.lang.Object o)
           
 void triggerEvent(int eventType, java.lang.Object data)
          Trigger an event for this view
protected  void triggerLogIDListeners(java.lang.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 java.lang.String logID

viewTitleInfo

protected ViewTitleInfo viewTitleInfo
Constructor Detail

BaseMdiEntry

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

getId

public java.lang.String getId()
Specified by:
getId in interface MdiEntry

addVitalityImage

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

close

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

getDatasourceCore

public java.lang.Object getDatasourceCore()

getExportableDatasource

public java.lang.String getExportableDatasource()
Specified by:
getExportableDatasource in interface MdiEntry

getDatasource

public java.lang.Object getDatasource()
Specified by:
getDatasource in interface MdiEntry

getLogID

public java.lang.String getLogID()
Specified by:
getLogID in interface MdiEntry

getMDI

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

getParentID

public java.lang.String getParentID()
Specified by:
getParentID in interface MdiEntry

setParentID

public void setParentID(java.lang.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(java.lang.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(java.lang.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(java.lang.Object o)
Parameters:
o -
Returns:
true: handled; false: not handled

setLogID

public void setLogID(java.lang.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(java.lang.String configID,
                       java.lang.Object params)

getSkinRef

public java.lang.String getSkinRef()

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface MdiEntry

updateLanguage

public void updateLanguage()

triggerEvent

public void triggerEvent(int eventType,
                         java.lang.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 java.util.Map<java.lang.String,java.lang.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(java.lang.String id)
Specified by:
setImageLeftID in interface MdiEntry

getImageLeftID

public java.lang.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(java.lang.String suffix)

releaseImageLeft

public void releaseImageLeft(java.lang.String suffix)

viewTitleInfoRefresh

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

build

public void build()

setPreferredAfterID

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

getPreferredAfterID

public java.lang.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(java.lang.Object datasource)
Specified by:
setDatasource in interface MdiEntry
Overrides:
setDatasource in class UISWTViewImpl

setTitle

public void setTitle(java.lang.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()