public class TabDecorator extends Object implements BasicDockableDisplayerDecorator, StackDockComponentParent
StackDockComponent as decoration.| Constructor and Description |
|---|
TabDecorator(DockStation station,
PropertyKey<DockActionDistributor> distributor)
Creates a new decorator
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
Adds the listener
listener to this decorator, listener will
be informed if a property of this decorator changes. |
protected void |
fireMoveableElementChanged()
Calls
BasicDockableDisplayerDecoratorListener.moveableElementChanged(BasicDockableDisplayerDecorator) on
all listeners that are currently registered. |
DockActionSource |
getActionSuggestion()
|
Component |
getComponent()
Gets the
Component which represents this decorator,
the result of this method may change whenever BasicDockableDisplayerDecorator.setController(DockController)
or BasicDockableDisplayerDecorator.setDockable(Component, Dockable) is called. |
Insets |
getDockableInsets()
Gets an estimate of how much space of
the component is used
by the border around the Dockable. |
DockElementRepresentative |
getMoveableElement()
Gets a
DockElementRepresentative that can be used to move the entire displayer. |
StackDockComponent |
getStackComponent()
Gets the component which is used by this
TabDecorator. |
DockStation |
getStackDockParent()
Gets the station this parent represents.
|
int |
indexOf(Dockable dockable)
Gets the index of
dockable in the list of dockables
that are present on this parent. |
void |
removeDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
Removes the listener
listener from this decorator. |
void |
setController(DockController controller)
Sets the controller in whose realm this decorator works
|
void |
setDockable(Component panel,
Dockable dockable)
Sets the element to show on this decorator, can be
null |
public TabDecorator(DockStation station, PropertyKey<DockActionDistributor> distributor)
station - the station for which this decorator is useddistributor - key to a DockActionDistributor that suggests the actions for the titlepublic void addDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
BasicDockableDisplayerDecoratorlistener to this decorator, listener will
be informed if a property of this decorator changes.addDecoratorListener in interface BasicDockableDisplayerDecoratorlistener - the new listener, not nullpublic void removeDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
BasicDockableDisplayerDecoratorlistener from this decorator.removeDecoratorListener in interface BasicDockableDisplayerDecoratorlistener - the listener to removeprotected void fireMoveableElementChanged()
BasicDockableDisplayerDecoratorListener.moveableElementChanged(BasicDockableDisplayerDecorator) on
all listeners that are currently registered.public DockStation getStackDockParent()
StackDockComponentParentgetStackDockParent in interface StackDockComponentParentpublic int indexOf(Dockable dockable)
StackDockComponentParentdockable in the list of dockables
that are present on this parent.indexOf in interface StackDockComponentParentdockable - some dockablepublic StackDockComponent getStackComponent()
TabDecorator.StackDockComponent, may be nullpublic void setDockable(Component panel, Dockable dockable)
BasicDockableDisplayerDecoratornullsetDockable in interface BasicDockableDisplayerDecoratorpanel - the component which represents dockabledockable - the element to showpublic DockElementRepresentative getMoveableElement()
BasicDockableDisplayerDecoratorDockElementRepresentative that can be used to move the entire displayer. This method
should not return the Dockable itself.getMoveableElement in interface BasicDockableDisplayerDecoratornullpublic void setController(DockController controller)
BasicDockableDisplayerDecoratorsetController in interface BasicDockableDisplayerDecoratorcontroller - the controllerpublic Component getComponent()
BasicDockableDisplayerDecoratorComponent which represents this decorator,
the result of this method may change whenever BasicDockableDisplayerDecorator.setController(DockController)
or BasicDockableDisplayerDecorator.setDockable(Component, Dockable) is called.getComponent in interface BasicDockableDisplayerDecoratornull to show nothingpublic DockActionSource getActionSuggestion()
BasicDockableDisplayerDecoratorDockActionSource which is forwarded to the DockTitle through
a ActionsDockTitleEvent. This method may be called at any time, the action source
must update itself if the settings of this decorator (like BasicDockableDisplayerDecorator.setController(DockController))
change.getActionSuggestion in interface BasicDockableDisplayerDecoratornullpublic Insets getDockableInsets()
BasicDockableDisplayerDecoratorthe component is used
by the border around the Dockable.getDockableInsets in interface BasicDockableDisplayerDecoratorCopyright © 2017 Docking Frames. All rights reserved.