bibliothek.gui.dock.themes
Class ThemeDockableSelection

java.lang.Object
  extended by bibliothek.gui.dock.themes.ThemeDockableSelection
All Implemented Interfaces:
DockableSelection

public class ThemeDockableSelection
extends java.lang.Object
implements DockableSelection

A DockableSelection that forwards any calls to the DockableSelection of the current DockTheme.

Author:
Benjamin Sigg

Constructor Summary
ThemeDockableSelection(DockController controller)
          Creates a new object
 
Method Summary
 void addDockableSelectionListener(DockableSelectionListener listener)
          Adds a listener that gets informed when the state of this selection changes.
 void close()
          Called when the current selection is no longer needed either because a selection was done or was canceled.
 java.awt.Component getComponent()
          Gets the component which represents the selection.
 boolean hasChoices(DockController controller)
          Checks whether controller has at least two different Dockables which would be shown on this DockableSelection.
 void open(DockController controller)
          Called when a new selection is about to happen.
 void removeDockableSelectionListener(DockableSelectionListener listener)
          Removes a listener that gets informed when the state of this selection changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeDockableSelection

public ThemeDockableSelection(DockController controller)
Creates a new object

Parameters:
controller - the controller whose DockTheme will be used
Method Detail

addDockableSelectionListener

public void addDockableSelectionListener(DockableSelectionListener listener)
Description copied from interface: DockableSelection
Adds a listener that gets informed when the state of this selection changes.

Specified by:
addDockableSelectionListener in interface DockableSelection
Parameters:
listener - the new listener

close

public void close()
Description copied from interface: DockableSelection
Called when the current selection is no longer needed either because a selection was done or was canceled.

Specified by:
close in interface DockableSelection

getComponent

public java.awt.Component getComponent()
Description copied from interface: DockableSelection
Gets the component which represents the selection. The result of this method should always be the same.

Specified by:
getComponent in interface DockableSelection
Returns:
the representation of this selection

hasChoices

public boolean hasChoices(DockController controller)
Description copied from interface: DockableSelection
Checks whether controller has at least two different Dockables which would be shown on this DockableSelection.

Specified by:
hasChoices in interface DockableSelection
Parameters:
controller - the controller which might not have any children at all
Returns:
true if opening this DockableSelection gives the user a choice, false if this selection would not show anything

open

public void open(DockController controller)
Description copied from interface: DockableSelection
Called when a new selection is about to happen.

Specified by:
open in interface DockableSelection
Parameters:
controller - the controller for which the selection will happen

removeDockableSelectionListener

public void removeDockableSelectionListener(DockableSelectionListener listener)
Description copied from interface: DockableSelection
Removes a listener that gets informed when the state of this selection changes.

Specified by:
removeDockableSelectionListener in interface DockableSelection
Parameters:
listener - the new listener