bibliothek.gui.dock.focus
Interface DockableSelection

All Known Implementing Classes:
AbstractDockableSelection, BasicDockableSelection, DefaultDockableSelection, EclipseDockableSelection, ThemeDockableSelection

public interface DockableSelection

A DockableSelection is a Component which shows some or all Dockables of a DockController. The user can select one of the Dockable either by using the mouse or the keyboard.

Author:
Benjamin Sigg

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.
 

Method Detail

hasChoices

boolean hasChoices(DockController controller)
Checks whether controller has at least two different Dockables which would be shown on this 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

getComponent

java.awt.Component getComponent()
Gets the component which represents the selection. The result of this method should always be the same.

Returns:
the representation of this selection

open

void open(DockController controller)
Called when a new selection is about to happen.

Parameters:
controller - the controller for which the selection will happen

close

void close()
Called when the current selection is no longer needed either because a selection was done or was canceled.


addDockableSelectionListener

void addDockableSelectionListener(DockableSelectionListener listener)
Adds a listener that gets informed when the state of this selection changes.

Parameters:
listener - the new listener

removeDockableSelectionListener

void removeDockableSelectionListener(DockableSelectionListener listener)
Removes a listener that gets informed when the state of this selection changes.

Parameters:
listener - the new listener