|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.control.focus.AbstractFocusController
public abstract class AbstractFocusController
Abstract implementation of FocusController
offering methods to
handle the listeners.
Constructor Summary | |
---|---|
AbstractFocusController(DockController controller)
Creates a new focus controller |
Method Summary | |
---|---|
void |
addDockableFocusListener(DockableFocusListener listener)
Adds a listener to this controller, the listener will be informed when the focused Dockable changes. |
void |
addVetoListener(FocusVetoListener listener)
Adds a listener to this controller which can cancel a call to the DockController . |
protected DockableFocusListener[] |
dockableFocusListeners()
Gets an array of currently registered DockableFocusListener s. |
protected void |
fireDockableFocused(Dockable oldFocused,
Dockable newFocused)
Informs all listeners that dockable has gained
the focus. |
protected FocusVetoListener.FocusVeto |
fireVetoDockable(Dockable dockable)
Asks all FocusVetoListener through their method
FocusVetoListener.vetoFocus(FocusController, Dockable)
whether they want cancel a call to the DockController . |
protected FocusVetoListener.FocusVeto |
fireVetoTitle(DockTitle title)
Asks all FocusVetoListener through their method
FocusVetoListener.vetoFocus(FocusController, DockTitle)
whether they want cancel a call to the DockController . |
void |
freezeFocus()
Temporarily disables this FocusController . |
DockController |
getController()
Gets the DockController whose Dockable s are tracked by this observer. |
FocusStrategy |
getStrategy()
Gets the strategy that selects the Component s to focus. |
protected boolean |
isFrozen()
Tells whether this FocusController is temporarily frozen and should
not process any events. |
void |
meltFocus()
Re-enabls this FocusController after it was temporarility disabled. |
void |
removeDockableFocusListener(DockableFocusListener listener)
Removes a listener from this controller. |
void |
removeVetoListener(FocusVetoListener listener)
Removes a listener from this controller |
void |
setStrategy(FocusStrategy strategy)
Sets the strategy which will be used to focus components. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.control.focus.FocusController |
---|
checkFocusedDockable, ensureFocusSet, getFocusedDockable, isOnFocusing, setFocusedDockable |
Constructor Detail |
---|
public AbstractFocusController(DockController controller)
controller
- the owner of this controller, not null
Method Detail |
---|
public void setStrategy(FocusStrategy strategy)
FocusController
setStrategy
in interface FocusController
strategy
- the new strategy, can be null
public FocusStrategy getStrategy()
FocusController
Component
s to focus.
getStrategy
in interface FocusController
null
public void freezeFocus()
FocusController
FocusController
. Any call that would lead to a change
in the focus is silently ignored.
freezeFocus
in interface FocusController
public void meltFocus()
FocusController
FocusController
after it was temporarility disabled.
meltFocus
in interface FocusController
protected boolean isFrozen()
FocusController
is temporarily frozen and should
not process any events.
true
if disabledpublic void addVetoListener(FocusVetoListener listener)
DockController
.
addVetoListener
in interface FocusController
listener
- the new listenerpublic void removeVetoListener(FocusVetoListener listener)
removeVetoListener
in interface FocusController
listener
- the listener to removeprotected FocusVetoListener.FocusVeto fireVetoTitle(DockTitle title)
FocusVetoListener
through their method
FocusVetoListener.vetoFocus(FocusController, DockTitle)
whether they want cancel a call to the DockController
.
title
- the title which is about to be focused
protected FocusVetoListener.FocusVeto fireVetoDockable(Dockable dockable)
FocusVetoListener
through their method
FocusVetoListener.vetoFocus(FocusController, Dockable)
whether they want cancel a call to the DockController
.
dockable
- the Dockable which is about to be focused
public DockController getController()
FocusController
DockController
whose Dockable
s are tracked by this observer.
getController
in interface FocusController
public void addDockableFocusListener(DockableFocusListener listener)
Dockable
changes.
addDockableFocusListener
in interface FocusController
listener
- the new listenerpublic void removeDockableFocusListener(DockableFocusListener listener)
removeDockableFocusListener
in interface FocusController
listener
- the listener to removeprotected DockableFocusListener[] dockableFocusListeners()
DockableFocusListener
s.
protected void fireDockableFocused(Dockable oldFocused, Dockable newFocused)
dockable
has gained
the focus.
oldFocused
- the old owner of the focus, may be null
newFocused
- the owner of the focus, may be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |