bibliothek.gui.dock.themes.basic
Interface BasicDockableDisplayerDecorator

All Known Implementing Classes:
MinimalDecorator, TabDecorator

public interface BasicDockableDisplayerDecorator

A decorator may add a Component between a BasicDockableDisplayer and a Dockable.

Author:
Benjamin Sigg

Method Summary
 void addDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
          Adds the listener listener to this decorator, listener will be informed if a property of this decorator changes.
 DockActionSource getActionSuggestion()
          Gets a DockActionSource which is forwarded to the DockTitle through a ActionsDockTitleEvent.
 Component getComponent()
          Gets the Component which represents this decorator, the result of this method may change whenever setController(DockController) or 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.
 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 component, Dockable dockable)
          Sets the element to show on this decorator, can be null
 

Method Detail

addDecoratorListener

void addDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
Adds the listener listener to this decorator, listener will be informed if a property of this decorator changes.

Parameters:
listener - the new listener, not null

removeDecoratorListener

void removeDecoratorListener(BasicDockableDisplayerDecoratorListener listener)
Removes the listener listener from this decorator.

Parameters:
listener - the listener to remove

setDockable

void setDockable(Component component,
                 Dockable dockable)
Sets the element to show on this decorator, can be null

Parameters:
component - the component which represents dockable
dockable - the element to show

setController

void setController(DockController controller)
Sets the controller in whose realm this decorator works

Parameters:
controller - the controller

getComponent

Component getComponent()
Gets the Component which represents this decorator, the result of this method may change whenever setController(DockController) or setDockable(Component, Dockable) is called.

Returns:
the component or null to show nothing

getActionSuggestion

DockActionSource getActionSuggestion()
Gets a DockActionSource 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 setController(DockController)) change.

Returns:
the suggestion for actions, can be null

getDockableInsets

Insets getDockableInsets()
Gets an estimate of how much space of the component is used by the border around the Dockable.

Returns:
an estimate of how much space is used by the border

getMoveableElement

DockElementRepresentative getMoveableElement()
Gets a DockElementRepresentative that can be used to move the entire displayer. This method should not return the Dockable itself.

Returns:
an element to move the displayer, can be null