bibliothek.gui.dock.themes.basic
Class TabDecorator

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.TabDecorator
All Implemented Interfaces:
StackDockComponentParent, BasicDockableDisplayerDecorator

public class TabDecorator
extends java.lang.Object
implements BasicDockableDisplayerDecorator, StackDockComponentParent

Shows a StackDockComponent as decoration.

Author:
Benjamin Sigg

Constructor Summary
TabDecorator(DockStation station)
          Creates a new decorator
 
Method Summary
 java.awt.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.
 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 setController(DockController controller)
          Sets the controller in whose realm this decorator works
 void setDockable(java.awt.Component panel, Dockable dockable)
          Sets the element to show on this decorator, can be null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabDecorator

public TabDecorator(DockStation station)
Creates a new decorator

Parameters:
station - the station for which this decorator is used
Method Detail

getStackDockParent

public DockStation getStackDockParent()
Description copied from interface: StackDockComponentParent
Gets the station this parent represents.

Specified by:
getStackDockParent in interface StackDockComponentParent
Returns:
the station

indexOf

public int indexOf(Dockable dockable)
Description copied from interface: StackDockComponentParent
Gets the index of dockable in the list of dockables that are present on this parent.

Specified by:
indexOf in interface StackDockComponentParent
Parameters:
dockable - some dockable
Returns:
its index or -1

getStackComponent

public StackDockComponent getStackComponent()
Gets the component which is used by this TabDecorator.

Returns:
the StackDockComponent, may be null

setDockable

public void setDockable(java.awt.Component panel,
                        Dockable dockable)
Description copied from interface: BasicDockableDisplayerDecorator
Sets the element to show on this decorator, can be null

Specified by:
setDockable in interface BasicDockableDisplayerDecorator
Parameters:
panel - the component which represents dockable
dockable - the element to show

setController

public void setController(DockController controller)
Description copied from interface: BasicDockableDisplayerDecorator
Sets the controller in whose realm this decorator works

Specified by:
setController in interface BasicDockableDisplayerDecorator
Parameters:
controller - the controller

getComponent

public java.awt.Component getComponent()
Description copied from interface: BasicDockableDisplayerDecorator
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.

Specified by:
getComponent in interface BasicDockableDisplayerDecorator
Returns:
the component or null to show nothing