public abstract class AbstractFocusController extends Object implements FocusController
FocusController offering methods to
handle the listeners.| Constructor and Description |
|---|
AbstractFocusController(DockController controller)
Creates a new focus controller
|
| Modifier and Type | Method and Description |
|---|---|
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-enables this
FocusController after it was temporarily 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckFocusedDockable, ensureFocusSet, focus, getFocusedDockable, isOnFocusing, onFocusRequestCompletion, setFocusedDockablepublic AbstractFocusController(DockController controller)
controller - the owner of this controller, not nullpublic void setStrategy(FocusStrategy strategy)
FocusControllersetStrategy 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 temporarily 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 focusedprotected 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 focusedpublic 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.Copyright © 2017 Docking Frames. All rights reserved.