cdx.scorebot.util.swing
Class CustomTabOrder

java.lang.Object
  extended by java.awt.FocusTraversalPolicy
      extended by cdx.scorebot.util.swing.CustomTabOrder

public class CustomTabOrder
extends java.awt.FocusTraversalPolicy

Allows users to easily generate focus traversal policies

Author:
David Underhill

Constructor Summary
CustomTabOrder(java.awt.Component[] compArray)
          Default constructor
 
Method Summary
static void createCustomTabOrder(java.awt.Container policyOwner, java.awt.Component[] compArray)
          Creates a custom FocusTraversalPolicy for the specified container which will allow the traversal of the specified components in the given order
 java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot, java.awt.Component aComponent)
           
 java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot, java.awt.Component aComponent)
           
 java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot)
           
 java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot)
           
 java.awt.Component getLastComponent(java.awt.Container focusCycleRoot)
           
 
Methods inherited from class java.awt.FocusTraversalPolicy
getInitialComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTabOrder

public CustomTabOrder(java.awt.Component[] compArray)
Default constructor

Method Detail

getComponentAfter

public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot,
                                            java.awt.Component aComponent)
Specified by:
getComponentAfter in class java.awt.FocusTraversalPolicy

getComponentBefore

public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot,
                                             java.awt.Component aComponent)
Specified by:
getComponentBefore in class java.awt.FocusTraversalPolicy

getDefaultComponent

public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot)
Specified by:
getDefaultComponent in class java.awt.FocusTraversalPolicy

getLastComponent

public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot)
Specified by:
getLastComponent in class java.awt.FocusTraversalPolicy

getFirstComponent

public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot)
Specified by:
getFirstComponent in class java.awt.FocusTraversalPolicy

createCustomTabOrder

public static final void createCustomTabOrder(java.awt.Container policyOwner,
                                              java.awt.Component[] compArray)
Creates a custom FocusTraversalPolicy for the specified container which will allow the traversal of the specified components in the given order

Parameters:
policyOwner - the container to create the policy for
compArray - array of components to create the traversal policy for