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

Quick Search    Search Deep

java.awt
Class DefaultFocusTraversalPolicy  view DefaultFocusTraversalPolicy download DefaultFocusTraversalPolicy.java

java.lang.Object
  extended byjava.awt.FocusTraversalPolicy
      extended byjava.awt.ContainerOrderFocusTraversalPolicy
          extended byjava.awt.DefaultFocusTraversalPolicy
All Implemented Interfaces:
java.io.Serializable

public class DefaultFocusTraversalPolicy
extends ContainerOrderFocusTraversalPolicy

DefaultFocusTraversalPolicy is the default focus traversal policy used by Containers. This policy sharpens ContainerOrderFocusTraversalPolicy's acceptance criteria, to reject those Components that have unfocusable peers. Despite this extra strictness, this policy will always accept a Component that has explicitly been set focusable by any means. This AWT implementation assumes that the peers of the following Components are not focusable: Canvas, Panel, Label, ScrollPane, Scrollbar, Window, and any lightweight Component. A Component's focusability is independent of the focusability of its peer.

Since:
1.4

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class java.awt.ContainerOrderFocusTraversalPolicy
 
Constructor Summary
DefaultFocusTraversalPolicy()
          Construct a default focus traversal policy.
 
Method Summary
protected  boolean accept(Component comp)
          Check whether a given Component would be acceptable as a focus owner.
 
Methods inherited from class java.awt.ContainerOrderFocusTraversalPolicy
getComponentAfter, getComponentBefore, getDefaultComponent, getFirstComponent, getImplicitDownCycleTraversal, getLastComponent, setImplicitDownCycleTraversal
 
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DefaultFocusTraversalPolicy

public DefaultFocusTraversalPolicy()
Construct a default focus traversal policy.

Method Detail

accept

protected boolean accept(Component comp)
Check whether a given Component would be acceptable as a focus owner. The Component must be displayable, visible and enabled to be acceptable. If the Component's focus traversability has been overridden, by overriding Component.isFocusTraversable or Component.isFocusable, or by calling Component.setFocusable, then the Component will be accepted if it is focusable. If the Component uses the default focus traversable behaviour, then comp will always be rejected if it is a Canvas, Panel, Label, ScrollPane, Scrollbar, Window or lightweight Component.

Overrides:
accept in class ContainerOrderFocusTraversalPolicy