|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.FocusTraversalPolicy | +--javax.swing.LegacyGlueFocusTraversalPolicy
A FocusTraversalPolicy which provides support for legacy applications which handle focus traversal via JComponent.setNextFocusableComponent or by installing a custom DefaultFocusManager. If a specific traversal has not been hard coded, then that traversal is provided either by the custom DefaultFocusManager, or by a wrapped FocusTraversalPolicy instance.
Field Summary | |
private HashMap |
backwardMap
|
private DefaultFocusManager |
delegateManager
|
private FocusTraversalPolicy |
delegatePolicy
|
private HashMap |
forwardMap
|
Constructor Summary | |
(package private) |
LegacyGlueFocusTraversalPolicy(DefaultFocusManager delegateManager)
|
(package private) |
LegacyGlueFocusTraversalPolicy(FocusTraversalPolicy delegatePolicy)
|
Method Summary | |
private boolean |
accept(Component aComponent)
|
Component |
getComponentAfter(Container focusCycleRoot,
Component aComponent)
Suppressed: Returns the Component that should receive the focus after aComponent. |
Component |
getComponentBefore(Container focusCycleRoot,
Component aComponent)
Suppressed: Returns the Component that should receive the focus before aComponent. |
Component |
getDefaultComponent(Container focusCycleRoot)
Suppressed: Returns the default Component to focus. |
Component |
getFirstComponent(Container focusCycleRoot)
Suppressed: Returns the first Component in the traversal cycle. |
Component |
getLastComponent(Container focusCycleRoot)
Suppressed: Returns the last Component in the traversal cycle. |
private void |
readObject(ObjectInputStream in)
|
(package private) void |
setNextFocusableComponent(Component left,
Component right)
|
(package private) void |
unsetNextFocusableComponent(Component left,
Component right)
|
private void |
writeObject(ObjectOutputStream out)
|
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 |
private transient FocusTraversalPolicy delegatePolicy
private transient DefaultFocusManager delegateManager
private HashMap forwardMap
private HashMap backwardMap
Constructor Detail |
LegacyGlueFocusTraversalPolicy(FocusTraversalPolicy delegatePolicy)
LegacyGlueFocusTraversalPolicy(DefaultFocusManager delegateManager)
Method Detail |
void setNextFocusableComponent(Component left, Component right)
void unsetNextFocusableComponent(Component left, Component right)
public Component getComponentAfter(Container focusCycleRoot, Component aComponent)
FocusTraversalPolicy
getComponentAfter
in class FocusTraversalPolicy
focusCycleRoot
- a focus cycle root of aComponentaComponent
- a (possibly indirect) child of focusCycleRoot, or
focusCycleRoot itself
public Component getComponentBefore(Container focusCycleRoot, Component aComponent)
FocusTraversalPolicy
getComponentBefore
in class FocusTraversalPolicy
focusCycleRoot
- a focus cycle root of aComponentaComponent
- a (possibly indirect) child of focusCycleRoot, or
focusCycleRoot itself
public Component getFirstComponent(Container focusCycleRoot)
FocusTraversalPolicy
getFirstComponent
in class FocusTraversalPolicy
focusCycleRoot
- the focus cycle root whose first Component is to
be returned
public Component getLastComponent(Container focusCycleRoot)
FocusTraversalPolicy
getLastComponent
in class FocusTraversalPolicy
focusCycleRoot
- the focus cycle root whose last Component is to be
returned
public Component getDefaultComponent(Container focusCycleRoot)
FocusTraversalPolicy
getDefaultComponent
in class FocusTraversalPolicy
focusCycleRoot
- the focus cycle root whose default Component is to
be returned
private boolean accept(Component aComponent)
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |