|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.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 DockableFocusListeners. |
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 Dockables are tracked by this observer. |
FocusStrategy |
getStrategy()
Gets the strategy that selects the Components 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 FocusControllerstrategy - the new strategy, can be nullpublic FocusStrategy getStrategy()
FocusControllerComponents to focus.
getStrategy in interface FocusControllernullpublic void freezeFocus()
FocusControllerFocusController. Any call that would lead to a change
in the focus is silently ignored.
freezeFocus in interface FocusControllerpublic void meltFocus()
FocusControllerFocusController after it was temporarility disabled.
meltFocus in interface FocusControllerprotected boolean isFrozen()
FocusController is temporarily frozen and should
not process any events.
true if disabledpublic void addVetoListener(FocusVetoListener listener)
DockController.
addVetoListener in interface FocusControllerlistener - the new listenerpublic void removeVetoListener(FocusVetoListener listener)
removeVetoListener in interface FocusControllerlistener - 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()
FocusControllerDockController whose Dockables are tracked by this observer.
getController in interface FocusControllerpublic void addDockableFocusListener(DockableFocusListener listener)
Dockable changes.
addDockableFocusListener in interface FocusControllerlistener - the new listenerpublic void removeDockableFocusListener(DockableFocusListener listener)
removeDockableFocusListener in interface FocusControllerlistener - the listener to removeprotected DockableFocusListener[] dockableFocusListeners()
DockableFocusListeners.
protected void fireDockableFocused(Dockable oldFocused,
Dockable newFocused)
dockable has gained
the focus.
oldFocused - the old owner of the focus, may be nullnewFocused - the owner of the focus, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||