bibliothek.gui.dock.displayer
Class DisplayerFocusTraversalPolicy

java.lang.Object
  extended by bibliothek.gui.dock.displayer.DisplayerFocusTraversalPolicy
All Implemented Interfaces:
SimplifiedFocusTraversalPolicy

public class DisplayerFocusTraversalPolicy
extends java.lang.Object
implements SimplifiedFocusTraversalPolicy

A traversal policy for DockableDisplayers. This policy changes between the DockTitle and the Dockable that is on the displayer.

Author:
Benjamin Sigg

Constructor Summary
DisplayerFocusTraversalPolicy(DockableDisplayer displayer)
          Creates a new policy.
 
Method Summary
 java.awt.Component getAfter(java.awt.Container container, java.awt.Component component)
          Gets the Component which should be focused next.
 java.awt.Component getBefore(java.awt.Container container, java.awt.Component component)
          Gets the Component which should be focused when stepping through the circle backwards.
 java.awt.Component getDefault(java.awt.Container container)
          Gets the Component which should be focused per default.
 java.awt.Component getFirst(java.awt.Container container)
          Gets the Component which should be focused when entering the circle.
 java.awt.Component getLast(java.awt.Container container)
          Gets the Component which should be focused when entering the circle backwards.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayerFocusTraversalPolicy

public DisplayerFocusTraversalPolicy(DockableDisplayer displayer)
Creates a new policy.

Parameters:
displayer - the owner of this policy
Method Detail

getAfter

public java.awt.Component getAfter(java.awt.Container container,
                                   java.awt.Component component)
Description copied from interface: SimplifiedFocusTraversalPolicy
Gets the Component which should be focused next.

Specified by:
getAfter in interface SimplifiedFocusTraversalPolicy
Parameters:
container - the root or provider of this policy
component - the currently focused component
Returns:
the next component or null

getBefore

public java.awt.Component getBefore(java.awt.Container container,
                                    java.awt.Component component)
Description copied from interface: SimplifiedFocusTraversalPolicy
Gets the Component which should be focused when stepping through the circle backwards.

Specified by:
getBefore in interface SimplifiedFocusTraversalPolicy
Parameters:
container - the root or provider of this policy
component - the currently focused component
Returns:
the previous component or null

getDefault

public java.awt.Component getDefault(java.awt.Container container)
Description copied from interface: SimplifiedFocusTraversalPolicy
Gets the Component which should be focused per default.

Specified by:
getDefault in interface SimplifiedFocusTraversalPolicy
Parameters:
container - the root or provider of this policy
Returns:
the default component or null

getFirst

public java.awt.Component getFirst(java.awt.Container container)
Description copied from interface: SimplifiedFocusTraversalPolicy
Gets the Component which should be focused when entering the circle.

Specified by:
getFirst in interface SimplifiedFocusTraversalPolicy
Parameters:
container - the root or provider of this policy
Returns:
the next component or null

getLast

public java.awt.Component getLast(java.awt.Container container)
Description copied from interface: SimplifiedFocusTraversalPolicy
Gets the Component which should be focused when entering the circle backwards.

Specified by:
getLast in interface SimplifiedFocusTraversalPolicy
Parameters:
container - the root or provider of this policy
Returns:
the next component or null