Interface FocusTraversalPolicy

  • All Known Implementing Classes:
    ContainerSkin.IndexFocusTraversalPolicy
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface FocusTraversalPolicy
    Defines the order in which components will receive focus during focus traversal.
    • Method Detail

      • getNextComponent

        Component getNextComponent​(Container container,
                                   Component component,
                                   FocusTraversalDirection direction)
        Returns the next focus destination according to this traversal policy.
        Parameters:
        container - The container to which the traversal policy applies.
        component - The component from which focus is being transferred. If null, 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.