Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing
Class CompatibilityFocusTraversalPolicy  view CompatibilityFocusTraversalPolicy download CompatibilityFocusTraversalPolicy.java

java.lang.Object
  extended byjava.awt.FocusTraversalPolicy
      extended byjavax.swing.CompatibilityFocusTraversalPolicy

class CompatibilityFocusTraversalPolicy
extends java.awt.FocusTraversalPolicy

Provides compatibility to the older focus API in JComponent.setNextFocusableComponent(Component) 55 .


Field Summary
private  java.util.HashMap backward
          Maps components to their previous focused components.
private  java.awt.FocusTraversalPolicy fallback
          The focus traversal policy that has been installed on the focus cycle root before, and to which we fall back.
private  java.util.HashMap forward
          Maps components to their next focused components.
 
Constructor Summary
(package private) CompatibilityFocusTraversalPolicy(java.awt.FocusTraversalPolicy p)
          Creates a new CompatibilityFocusTraversalPolicy with the specified policy as fallback.
 
Method Summary
(package private)  void addNextFocusableComponent(java.awt.Component current, java.awt.Component next)
          Sets a next focused component for a specified component.
 java.awt.Component getComponentAfter(java.awt.Container root, java.awt.Component current)
          Returns the Component that should receive the focus after a Component.
 java.awt.Component getComponentBefore(java.awt.Container root, java.awt.Component current)
          Returns the Component that should receive the focus before a Component.
 java.awt.Component getDefaultComponent(java.awt.Container root)
          Returns the default Component to focus.
 java.awt.Component getFirstComponent(java.awt.Container root)
          Returns the first Component in the traversal cycle.
 java.awt.Component getLastComponent(java.awt.Container root)
          Returns the last Component in the traversal cycle.
(package private)  void removeNextFocusableComponent(java.awt.Component current, java.awt.Component next)
          Removes a focused component mapping.
(package private)  void setNextFocusableComponent(java.awt.Component current, java.awt.Component next)
          Sets a next focused component for a specified component.
 
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
 

Field Detail

fallback

private java.awt.FocusTraversalPolicy fallback
The focus traversal policy that has been installed on the focus cycle root before, and to which we fall back.


forward

private java.util.HashMap forward
Maps components to their next focused components.


backward

private java.util.HashMap backward
Maps components to their previous focused components.

Constructor Detail

CompatibilityFocusTraversalPolicy

CompatibilityFocusTraversalPolicy(java.awt.FocusTraversalPolicy p)
Creates a new CompatibilityFocusTraversalPolicy with the specified policy as fallback.

Method Detail

getComponentAfter

public java.awt.Component getComponentAfter(java.awt.Container root,
                                            java.awt.Component current)
Description copied from class: java.awt.FocusTraversalPolicy
Returns the Component that should receive the focus after a Component.


getComponentBefore

public java.awt.Component getComponentBefore(java.awt.Container root,
                                             java.awt.Component current)
Description copied from class: java.awt.FocusTraversalPolicy
Returns the Component that should receive the focus before a Component.


getFirstComponent

public java.awt.Component getFirstComponent(java.awt.Container root)
Description copied from class: java.awt.FocusTraversalPolicy
Returns the first Component in the traversal cycle.


getLastComponent

public java.awt.Component getLastComponent(java.awt.Container root)
Description copied from class: java.awt.FocusTraversalPolicy
Returns the last Component in the traversal cycle.


getDefaultComponent

public java.awt.Component getDefaultComponent(java.awt.Container root)
Description copied from class: java.awt.FocusTraversalPolicy
Returns the default Component to focus.


setNextFocusableComponent

void setNextFocusableComponent(java.awt.Component current,
                               java.awt.Component next)
Sets a next focused component for a specified component. This is called by JComponent.setNextFocusableComponent(Component) 55 .


addNextFocusableComponent

void addNextFocusableComponent(java.awt.Component current,
                               java.awt.Component next)
Sets a next focused component for a specified component. This is called by JComponent.setNextFocusableComponent(Component) 55 .


removeNextFocusableComponent

void removeNextFocusableComponent(java.awt.Component current,
                                  java.awt.Component next)
Removes a focused component mapping. This is called by JComponent.setNextFocusableComponent(Component) 55 .