bibliothek.gui.dock.common.intern
Class DefaultCommonDockable

java.lang.Object
  extended by bibliothek.gui.dock.dockable.AbstractDockable
      extended by bibliothek.gui.dock.DefaultDockable
          extended by bibliothek.gui.dock.common.intern.DefaultCommonDockable
All Implemented Interfaces:
CommonDockable, DockElement, DockElementRepresentative, Dockable

public class DefaultCommonDockable
extends DefaultDockable
implements CommonDockable

A default implementation of CommonDockable, based on a DefaultDockable.

Author:
Benjamin Sigg

Constructor Summary
DefaultCommonDockable(CDockable dockable, DockActionSource... sources)
          Creates a new dockable
 
Method Summary
 CActionSource getActions()
          Gets the action source for actions that are added by the client.
 CDockable getDockable()
          Gets the model of this dockable.
 DockTitle getDockTitle(DockTitleVersion version)
          Invoked to get a graphical representation of a title for this Dockable.
 DockActionSource[] getSources()
          Gets a set of DockActionSources which are to be displayed on this CommonDockable as well.
 CStation<?> getStation()
          Gets the model of this dockable as station.
 
Methods inherited from class bibliothek.gui.dock.DefaultDockable
add, add, asDockStation, getComponent, getContentPane, getFactoryID, remove, setFactoryID, setLayout
 
Methods inherited from class bibliothek.gui.dock.dockable.AbstractDockable
accept, accept, addDockableListener, addDockHierarchyListener, addKeyListener, addMouseInputListener, asDockable, bind, configureDisplayerHints, fireTitleBound, fireTitleExchanged, fireTitleExchanged, fireTitleIconChanged, fireTitleTextChanged, fireTitleTooltipChanged, fireTitleUnbound, getConfigurableDisplayerHints, getController, getDockParent, getElement, getGlobalActionOffers, getLocalActionOffers, getPopupLocation, getTitleIcon, getTitleText, getTitleToolTip, isUsedAsTitle, listBoundTitles, removeDockableListener, removeDockHierarchyListener, removeKeyListener, removeMouseInputListener, setActionOffers, setController, setDockParent, setTitleIcon, setTitleText, setTitleToolTip, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.common.intern.CommonDockable
getFactoryID
 
Methods inherited from interface bibliothek.gui.Dockable
accept, accept, addDockableListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getComponent, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, listBoundTitles, removeDockableListener, removeDockHierarchyListener, removeMouseInputListener, setController, setDockParent, unbind
 
Methods inherited from interface bibliothek.gui.dock.DockElement
asDockable, asDockStation
 
Methods inherited from interface bibliothek.gui.dock.DockElementRepresentative
getElement, getPopupLocation, isUsedAsTitle
 

Constructor Detail

DefaultCommonDockable

public DefaultCommonDockable(CDockable dockable,
                             DockActionSource... sources)
Creates a new dockable

Parameters:
dockable - the model of this element
sources - action source which shows the close action
Method Detail

getActions

public CActionSource getActions()
Gets the action source for actions that are added by the client.

Returns:
the source, not null

getDockable

public CDockable getDockable()
Description copied from interface: CommonDockable
Gets the model of this dockable.

Specified by:
getDockable in interface CommonDockable
Returns:
the model

getStation

public CStation<?> getStation()
Description copied from interface: CommonDockable
Gets the model of this dockable as station.

Specified by:
getStation in interface CommonDockable
Returns:
the model, may be null

getSources

public DockActionSource[] getSources()
Description copied from interface: CommonDockable
Gets a set of DockActionSources which are to be displayed on this CommonDockable as well. Note that every call to this method should return the same array of sources. Callers should not modify the result.

Specified by:
getSources in interface CommonDockable
Returns:
the action sources

getDockTitle

public DockTitle getDockTitle(DockTitleVersion version)
Description copied from interface: Dockable
Invoked to get a graphical representation of a title for this Dockable.
There are several requirements to the title and the caller:

Specified by:
getDockTitle in interface Dockable
Overrides:
getDockTitle in class AbstractDockable
Parameters:
version - which title is required. If this Dockable does not have a special rule for the given version, it can return the result of DockTitleVersion.createDockable(Dockable).
Returns:
The title, can be null if no title should be shown. Note that not all clients can handle a null-title, if in doubt, return a title.