bibliothek.gui.dock.common.intern
Class DefaultCommonDockable
java.lang.Object
bibliothek.gui.dock.dockable.AbstractDockable
bibliothek.gui.dock.DefaultDockable
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
Methods inherited from class bibliothek.gui.dock.dockable.AbstractDockable |
accept, accept, addDockableListener, addDockHierarchyListener, 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, 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.Dockable |
accept, accept, addDockableListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getComponent, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, listBoundTitles, removeDockableListener, removeDockHierarchyListener, removeMouseInputListener, setController, setDockParent, unbind |
DefaultCommonDockable
public DefaultCommonDockable(CDockable dockable,
DockActionSource close)
- Creates a new dockable
- Parameters:
dockable
- the model of this elementclose
- action source which shows the close action
getActions
public DefaultDockActionSource getActions()
getDockable
public CDockable getDockable()
- Description copied from interface:
CommonDockable
- Gets the model of this dockable.
- Specified by:
getDockable
in interface CommonDockable
- Returns:
- the model
getClose
public DockActionSource getClose()
- Description copied from interface:
CommonDockable
- Gets the
DockActionSource
which shows the close-action.
- Specified by:
getClose
in interface CommonDockable
- Returns:
- the action source
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:
- The
owner
of the title must be this Dockable.
- The
origin
of the title must be version
.
- The title must not be bound
- The result should be independent of the current state of this Dockable.
- The method should not change any attribute of this Dockable
- The client must call the
Dockable.bind(DockTitle)
-method of this Dockable
before using the title. Note that a client must not call the
bind-method of DockTitle
- The client must call the
Dockable.unbind(DockTitle)
-method when he no
longer needs the title. Note that the client must not call the
unbind-method of the DockTitle
- 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.