java.awt

Class FocusTraversalPolicy

public abstract class FocusTraversalPolicy extends Object

Since: 1.4

Constructor Summary
FocusTraversalPolicy()
Creates a FocusTraversalPolicy object.
Method Summary
abstract ComponentgetComponentAfter(Container root, Component current)
Returns the Component that should receive the focus after a Component.
abstract ComponentgetComponentBefore(Container root, Component current)
Returns the Component that should receive the focus before a Component.
abstract ComponentgetDefaultComponent(Container root)
Returns the default Component to focus.
abstract ComponentgetFirstComponent(Container root)
Returns the first Component in the traversal cycle.
ComponentgetInitialComponent(Window window)
Returns the Component that should receive the focus when a Window is made visible for the first time.
abstract ComponentgetLastComponent(Container root)
Returns the last Component in the traversal cycle.

Constructor Detail

FocusTraversalPolicy

public FocusTraversalPolicy()
Creates a FocusTraversalPolicy object.

Method Detail

getComponentAfter

public abstract Component getComponentAfter(Container root, Component current)
Returns the Component that should receive the focus after a Component.

Throws: IllegalArgumentException If root or current is null, or if root is not a focus cycle root of current.

getComponentBefore

public abstract Component getComponentBefore(Container root, Component current)
Returns the Component that should receive the focus before a Component.

Throws: IllegalArgumentException If root or current is null, or if root is not a focus cycle root of current.

getDefaultComponent

public abstract Component getDefaultComponent(Container root)
Returns the default Component to focus.

Throws: IllegalArgumentException If root is null.

getFirstComponent

public abstract Component getFirstComponent(Container root)
Returns the first Component in the traversal cycle.

Throws: IllegalArgumentException If root is null.

getInitialComponent

public Component getInitialComponent(Window window)
Returns the Component that should receive the focus when a Window is made visible for the first time.

Throws: IllegalArgumentException If window is null.

getLastComponent

public abstract Component getLastComponent(Container root)
Returns the last Component in the traversal cycle.

Throws: IllegalArgumentException If root is null.