public abstract class ActionDisablingStrategyObserver extends Object
DockAction with the current
DisablingStrategy. It only requires the DockAction to call bind(Dockable)
and unbind(Dockable) in order to observe a Dockable.| Constructor and Description |
|---|
ActionDisablingStrategyObserver(DockAction action)
Creates a new observer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Dockable dockable)
Must be called to inform this observer that
dockable is to be observed. |
boolean |
isDisabled(Dockable dockable)
Tells whether the action of
dockable is disabled. |
protected abstract void |
setDisabled(Dockable dockable,
boolean disabled)
Called if the disabled state of the action changed.
|
protected abstract void |
setDisabled(Set<Dockable> dockable,
boolean disabled)
Called if an entire set of
Dockables changed their state. |
void |
unbind(Dockable dockable)
Must be called to inform this observer that
dockable is no longer to be observed. |
public ActionDisablingStrategyObserver(DockAction action)
action - the action whose disabled state will be monitored.public void bind(Dockable dockable)
dockable is to be observed. Can be
called multiple times.dockable - the item to observepublic void unbind(Dockable dockable)
dockable is no longer to be observed.
Can be called multiple times.dockable - the item to observeprotected abstract void setDisabled(Dockable dockable, boolean disabled)
dockable - the dockable for which the state changeddisabled - the new stateprotected abstract void setDisabled(Set<Dockable> dockable, boolean disabled)
Dockables changed their state.dockable - the items that changed their statedisabled - the new statepublic boolean isDisabled(Dockable dockable)
dockable is disabled.dockable - the element whose action state is searchedtrue if the action is disabled, false otherwiseCopyright © 2017 Docking Frames. All rights reserved.