bibliothek.gui.dock.control.focus
Interface FocusStrategy

All Known Implementing Classes:
DefaultFocusStrategy

public interface FocusStrategy

A FocusStrategy is used by a DockController to decide which Component to focus if a Dockable should receive the focus.

Author:
Benjamin Sigg

Method Summary
 void bind()
          Informs this strategy that it will be used from now on.
 Component getFocusComponent(Dockable dockable)
          Given a Dockable this method tells which Component should be focused.
 void unbind()
          Informs this strategy that it is no longer used from now on.
 

Method Detail

getFocusComponent

Component getFocusComponent(Dockable dockable)
Given a Dockable this method tells which Component should be focused.

Parameters:
dockable - some dockable which is about to get the focus
Returns:
the component to focus or null if this method cannot decide (in which case a default component will be chosen). If the Component is not focusable, then the next Component that follows in the iteration of focusable Components will be focused

bind

void bind()
Informs this strategy that it will be used from now on.


unbind

void unbind()
Informs this strategy that it is no longer used from now on.