bibliothek.gui.dock.control
Class DockableSelector

java.lang.Object
  extended by bibliothek.gui.dock.control.DockableSelector

public class DockableSelector
extends Object

A DockableSelector is able to open a popup when the user hits a special combination of keys. The popup uses a DockableSelection to present the user different Dockables from which he can choose one to become focused.

Author:
Benjamin Sigg

Field Summary
static PropertyKey<KeyStroke> INIT_SELECTION
          key for the DockProperties, telling which KeyStroke activates the selection
 
Constructor Summary
DockableSelector()
           
 
Method Summary
 void cancel()
          Closes the currently open popup window without changing the focused Dockable
 boolean isOpen()
          Tells whether the window is shown to the user right now.
 void select()
          Opens the popup window if possible and allows the user the choice between different Dockables.
 void setController(DockController controller)
          Sets the controller which should be observed.
 void stop(Dockable dockable)
          Close the currently open popup window and changes the focused Dockable to dockable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_SELECTION

public static final PropertyKey<KeyStroke> INIT_SELECTION
key for the DockProperties, telling which KeyStroke activates the selection

Constructor Detail

DockableSelector

public DockableSelector()
Method Detail

setController

public void setController(DockController controller)
Sets the controller which should be observed.

Parameters:
controller - the currently observed controller

select

public void select()
Opens the popup window if possible and allows the user the choice between different Dockables.


isOpen

public boolean isOpen()
Tells whether the window is shown to the user right now.

Returns:
whether the window is visible

cancel

public void cancel()
Closes the currently open popup window without changing the focused Dockable


stop

public void stop(Dockable dockable)
Close the currently open popup window and changes the focused Dockable to dockable.

Parameters:
dockable - the element that will own the focus