|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.FocusTraversalPolicy
bibliothek.gui.dock.focus.DockFocusTraversalPolicy
public class DockFocusTraversalPolicy
A FocusTraversalPolicy that uses the algorithms of a SimplifiedFocusTraversalPolicy
to do its work. This policy ensures that only valid Components
are selected, and it respects the constraints for nested policies.
| Constructor Summary | |
|---|---|
DockFocusTraversalPolicy(SimplifiedFocusTraversalPolicy policy,
boolean circle)
Creates a new policy. |
|
| Method Summary | |
|---|---|
protected boolean |
accept(Component component)
Tells whether component can be focused or not. |
protected Component |
after(Component component)
Searches the next Component which might gain the focus. |
protected Component |
before(Component component)
Searches the previous Component which might gain the focus. |
Component |
getComponentAfter(Container container,
Component component)
|
Component |
getComponentBefore(Container container,
Component component)
|
Component |
getDefaultComponent(Container container)
|
Component |
getFirstComponent(Container container)
|
protected FocusTraversalPolicy |
getFocusTraversalPolicy(Container provider)
Searches the FocusTraversalPolicy which should be used by
provider. |
Component |
getLastComponent(Container container)
|
protected Container |
getRootOrProvider(Component component)
Searches the first parent of component that is either
a focus cycle root or
a policy provider. |
| 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 |
| Constructor Detail |
|---|
public DockFocusTraversalPolicy(SimplifiedFocusTraversalPolicy policy,
boolean circle)
policy - the delegate providing algorithms for this policycircle - if true then this policy does not respect
the exact description of the functionality of FocusTraversalPolicy
in order to ensure that getComponentAfter( getComponentBefore( x )) == x and
getComponentBefore( getComponentAfter( x )) == x.| Method Detail |
|---|
protected boolean accept(Component component)
component can be focused or not.
component - some Component which might gain the focus.
true if component is allowed to
gain the focus, false otherwise
public Component getComponentAfter(Container container,
Component component)
getComponentAfter in class FocusTraversalPolicyprotected Component after(Component component)
Component which might gain the focus. This
method searches recursively through the tree of Components, but
does not loop.
component - the currently focused Component.
Component which might gain the focus
public Component getComponentBefore(Container container,
Component component)
getComponentBefore in class FocusTraversalPolicyprotected Component before(Component component)
Component which might gain the focus. This
method searches recursively through the tree of Components, but
does not loop.
component - the currently focused Component.
Component which might gain the focuspublic Component getDefaultComponent(Container container)
getDefaultComponent in class FocusTraversalPolicypublic Component getFirstComponent(Container container)
getFirstComponent in class FocusTraversalPolicypublic Component getLastComponent(Container container)
getLastComponent in class FocusTraversalPolicyprotected Container getRootOrProvider(Component component)
component that is either
a focus cycle root or
a policy provider.
component - some component
nullprotected FocusTraversalPolicy getFocusTraversalPolicy(Container provider)
FocusTraversalPolicy which should be used by
provider. This method searches for a focus cycle root or
policy provider whose traversal policy is set.
provider - a focus cycle root or policy provider whose
SimplifiedFocusTraversalPolicy is searched.
provider or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||