|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.control.focus.DefaultFocusStrategy
public class DefaultFocusStrategy
The DefaultFocusStrategy
keeps track of the last focused Component
of any
Dockable
that is registered at a DockController
.
Constructor Summary | |
---|---|
DefaultFocusStrategy(DockController controller)
|
Method Summary | |
---|---|
void |
bind()
Informs this strategy that it will be used from now on. |
protected boolean |
focusable(java.awt.Component component)
Tells whether the non-focusable component in reality is focusable. |
java.awt.Component |
getFocusComponent(Dockable dockable,
java.awt.Component mouseClicked)
Given a Dockable this method tells which Component should be focused. |
void |
unbind()
Informs this strategy that it is no longer used from now on. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFocusStrategy(DockController controller)
Method Detail |
---|
protected boolean focusable(java.awt.Component component)
component
in reality is focusable. This is true
for example for any child of a JComboBox
.
component
- the component which seems to be not focusable, but in reality is focusable
true
if component
should be treated as if it would be focusablepublic java.awt.Component getFocusComponent(Dockable dockable, java.awt.Component mouseClicked)
FocusStrategy
Dockable
this method tells which Component
should be focused.
getFocusComponent
in interface FocusStrategy
dockable
- some dockable which is about to get the focusmouseClicked
- the component which was touched by the mouse and which would get the focus normally. Can be null
.
null
.
null
indicates that this strategy cannot decide what to do. In this case a default component will receive the focus.mouseClicked
forces focus onto mouseClicked
, even if that Component
is not focusable.Component
will receive focus if focusable, or focus will be transfered to the next focusable Component
starting the search at the returned value.public void bind()
FocusStrategy
bind
in interface FocusStrategy
public void unbind()
FocusStrategy
unbind
in interface FocusStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |