|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.FocusTraversalPolicy
com.retek.commons.gui.util.RetekFocusPolicy
This class is the keyboard focus traversal policy for all applications. Any method of the FocusTraversalPolicy that does not supply a component with its own code will then try to use LayoutFocusTraversalPolicy to find the component. The default order of components in a container is determined by getComponents() unless the container is a RPanel, then it uses getFocusCycleComponents().
Constructor Summary | |
---|---|
RetekFocusPolicy()
Creates a new RetekFocusPolicy. |
Method Summary | |
---|---|
protected boolean |
accept(java.awt.Component component)
Accepts or rejects a component. |
protected void |
addComponentToArray(java.awt.Component component)
Adds a component to the global component array. |
protected void |
buildFullCycle(java.awt.Container container,
java.awt.Component component)
Builds a full cycle of components for the container, attempting to set the global index of the component passed in. |
java.awt.Component |
getComponentAfter(java.awt.Container focusCycleRoot,
java.awt.Component component)
Returns the Component that should receive the focus after component. |
java.awt.Component |
getComponentBefore(java.awt.Container focusCycleRoot,
java.awt.Component component)
Returns the Component that should receive the focus before component. |
java.awt.Component |
getDefaultComponent(java.awt.Container focusCycleRoot)
Returns the default Component to focus. |
java.awt.Component |
getFirstComponent(java.awt.Container focusCycleRoot)
Returns the first Component in the traversal cycle. |
java.awt.Component |
getLastComponent(java.awt.Container focusCycleRoot)
Returns the last Component in the traversal cycle. |
protected void |
processCycleComponent(java.awt.Component component)
Processes a component to determine if it should be added to the global cycle array. |
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 |
public RetekFocusPolicy()
Method Detail |
public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot)
NOTE: This method should be altered to scan the components in the buildFullCycle() method and return a "default" component such as a default button if one is found.
focusCycleRoot
- The focus cycle root whose default Component is to be returned
java.lang.IllegalArgumentException
- If focusCycleRoot is null.public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot)
focusCycleRoot
- The focus cycle root whose first Component is to be returned.
java.lang.IllegalArgumentException
- If focusCycleRoot is null.public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot)
focusCycleRoot
- The focus cycle root whose last Component is to be returned.
java.lang.IllegalArgumentException
- If focusCycleRoot is nullpublic java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot, java.awt.Component component)
focusCycleRoot
- A focus cycle root of component.component
- A (possibly indirect) child of focusCycleRoot, or focusCycleRoot itself.
java.lang.IllegalArgumentException
- If focusCycleRoot is not a focus cycle root of component,
or if either focusCycleRoot or component is null.public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot, java.awt.Component component)
focusCycleRoot
- A focus cycle root of component.component
- A (possibly indirect) child of focusCycleRoot, or focusCycleRoot itself.
java.lang.IllegalArgumentException
- If focusCycleRoot is not a focus cycle root of component,
or if either focusCycleRoot or component is null.protected void buildFullCycle(java.awt.Container container, java.awt.Component component)
container
- A container to build the global focus cycle for.component
- A component to find in the cycle and set the global index.`protected void processCycleComponent(java.awt.Component component)
component
- The component to process.protected void addComponentToArray(java.awt.Component component)
component
- The component to add.protected boolean accept(java.awt.Component component)
component
- The component to validate.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |