javax.swing
Class SwingDefaultFocusTraversalPolicy
java.lang.Object
|
+--java.awt.FocusTraversalPolicy
|
+--java.awt.ContainerOrderFocusTraversalPolicy
|
+--java.awt.DefaultFocusTraversalPolicy
|
+--javax.swing.SwingDefaultFocusTraversalPolicy
- All Implemented Interfaces:
- Serializable
- class SwingDefaultFocusTraversalPolicy
- extends DefaultFocusTraversalPolicy
Method Summary |
boolean |
accept(Component aComponent)
Determines whether a Component is an acceptable choice as the new
focus owner. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingDefaultFocusTraversalPolicy
SwingDefaultFocusTraversalPolicy()
accept
public boolean accept(Component aComponent)
- Description copied from class:
DefaultFocusTraversalPolicy
- Determines whether a Component is an acceptable choice as the new
focus owner. The Component must be visible, displayable, and enabled
to be accepted. If client code has explicitly set the focusability
of the Component by either overriding
Component.isFocusTraversable()
or
Component.isFocusable()
, or by calling
Component.setFocusable()
, then the Component will be
accepted if and only if it is focusable. If, however, the Component is
relying on default focusability, then all Canvases, Labels, Panels,
Scrollbars, ScrollPanes, Windows, and lightweight Components will be
rejected.
- Overrides:
accept
in class DefaultFocusTraversalPolicy
- Parameters:
aComponent
- the Component whose fitness as a focus owner is to
be tested
- Returns:
true
if aComponent meets the above requirements;
false
otherwise
comments?