Package org.apache.pivot.wtk.skin
Class ContainerSkin.IndexFocusTraversalPolicy
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ContainerSkin.IndexFocusTraversalPolicy
-
- All Implemented Interfaces:
FocusTraversalPolicy
- Enclosing class:
- ContainerSkin
public static class ContainerSkin.IndexFocusTraversalPolicy extends java.lang.Object implements FocusTraversalPolicy
Focus traversal policy that determines traversal order based on the order of components in the container's component sequence.
-
-
Constructor Summary
Constructors Constructor Description IndexFocusTraversalPolicy()
Create a new policy with default wrap behavior (that is, don't wrap).IndexFocusTraversalPolicy(boolean newWrap)
Create a new policy using the given wrap value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Component
getNextComponent(Container container, Component component, FocusTraversalDirection direction)
Returns the next focus destination according to this traversal policy.
-
-
-
Constructor Detail
-
IndexFocusTraversalPolicy
public IndexFocusTraversalPolicy()
Create a new policy with default wrap behavior (that is, don't wrap).
-
IndexFocusTraversalPolicy
public IndexFocusTraversalPolicy(boolean newWrap)
Create a new policy using the given wrap value.- Parameters:
newWrap
- Whether or not the policy should wrap around the ends of the container.
-
-
Method Detail
-
getNextComponent
public Component getNextComponent(Container container, Component component, FocusTraversalDirection direction)
Description copied from interface:FocusTraversalPolicy
Returns the next focus destination according to this traversal policy.- Specified by:
getNextComponent
in interfaceFocusTraversalPolicy
- Parameters:
container
- The container to which the traversal policy applies.component
- The component from which focus is being transferred. Ifnull
, implementations should return the first component for a forward traversal and the last component for a backward traversal.direction
- The direction in which to transfer focus.- Returns:
- The component to focus, or
null
if there are no more components in the given direction or next component cannot be determined.
-
-