|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.FocusTraversalPolicy
javax.swing.InternalFrameFocusTraversalPolicy
javax.swing.SortingFocusTraversalPolicy
javax.swing.LayoutFocusTraversalPolicy
com.jgoodies.uif.util.UIFFocusTraversalPolicy
public class UIFFocusTraversalPolicy
A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container. In addition to its superclass, this class excludes non-editable text components, scroll bars, and the root pane from the focus cycle. Also this policy offers to set an optional initial component that overrides the Swing default initial component.
JTextComponent.isEditable()
,
Serialized FormField Summary | |
---|---|
static FocusTraversalPolicy |
DEFAULT
Holds a default instance of the focus traversal policy, intended to be used as the global default policy. |
Constructor Summary | |
---|---|
UIFFocusTraversalPolicy()
Constructs a UIFFocusTraversalPolicy with no initial component set. |
|
UIFFocusTraversalPolicy(Component initialComponent)
Constructs a UIFFocusTraversalPolicy with the given Component as initial component. |
Method Summary | |
---|---|
protected boolean |
accept(Component aComponent)
Determines whether a Component is an acceptable choice as the new focus owner. |
Component |
getInitialComponent(Window window)
Returns the Component that should receive the focus when a Window is made visible for the first time. |
void |
setInitialComponent(Component initialComponent)
Sets the Component that should receive the focus when a Window is made visible for the first time. |
Methods inherited from class javax.swing.LayoutFocusTraversalPolicy |
---|
getComponentAfter, getComponentBefore, getFirstComponent, getLastComponent |
Methods inherited from class javax.swing.SortingFocusTraversalPolicy |
---|
getComparator, getDefaultComponent, getImplicitDownCycleTraversal, setComparator, setImplicitDownCycleTraversal |
Methods inherited from class javax.swing.InternalFrameFocusTraversalPolicy |
---|
getInitialComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FocusTraversalPolicy DEFAULT
KeyboardFocusManager.setDefaultFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
Constructor Detail |
---|
public UIFFocusTraversalPolicy()
public UIFFocusTraversalPolicy(Component initialComponent)
initialComponent
- the Component that will be returned
as initial component instead of Swing default initial componentMethod Detail |
---|
protected boolean accept(Component aComponent)
accept
in class LayoutFocusTraversalPolicy
aComponent
- the Component whose fitness as a focus owner is to
be tested
true
if aComponent is visible, displayable,
enabled, and focusable; false
otherwisepublic void setInitialComponent(Component initialComponent)
initialComponent
- the Component that should receive
the focus when window is made visible for the first time,
or null to use the super implementation's initial componentgetInitialComponent(Window)
public Component getInitialComponent(Window window)
getInitialComponent
in class FocusTraversalPolicy
window
- the Window whose initial Component is to be returned
IllegalArgumentException
- if window is nullsetInitialComponent(Component)
,
FocusTraversalPolicy.getDefaultComponent(java.awt.Container)
,
Window.getMostRecentFocusOwner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |