public abstract class AbstractStandardDockAction extends Object implements StandardDockAction
DockAction-interface.
This implementation allows to register
some StandardDockActionListener, and stores the Dockables
which are using this action.| Modifier and Type | Field and Description |
|---|---|
protected List<StandardDockActionListener> |
listeners
The listeners that are registered by this action
|
BUTTON_CONTENT_FILTER| Constructor and Description |
|---|
AbstractStandardDockAction(boolean monitorDisabling)
Creates a new action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDockActionListener(StandardDockActionListener listener)
Adds a listener to this DockAction.
|
void |
bind(Dockable dockable)
Informs this DockAction that icons, text, and other stuff like that,
will be requested from this DockAction.
|
protected void |
bound(Dockable dockable)
Invoked by this
AbstractStandardDockAction when a Dockable
was bound to this action the first time. |
protected void |
fireActionEnabledChanged(Set<Dockable> dockables)
Invokes the
actionEnabledChanged-
method of all currently registered StandardDockActionListener |
protected void |
fireActionIconChanged(ActionContentModifier modifier,
Set<Dockable> dockables)
Invokes the
actionIconChanged-
method of all currently registered StandardDockActionListener |
protected void |
fireActionRepresentativeChanged(Set<Dockable> dockables)
Invokes the
actionRepresentativeChanged-
method of all currently registered StandardDockActionListener |
protected void |
fireActionTextChanged(Set<Dockable> dockables)
Invokes the
actionTextChanged-
method of all currently registered StandardDockActionListener |
protected void |
fireActionTooltipTextChanged(Set<Dockable> dockables)
Invokes the
actionTooltipTextChanged-
method of all currently registered StandardDockActionListener |
Set<Dockable> |
getBoundDockables()
Gets a set of all
Dockables which are currently
bound to this DockAction. |
boolean |
isBound(Dockable dockable)
Tells whether the
dockable is bound with this
action, or not. |
boolean |
isEnabled(Dockable dockable)
This method chooses the result according to the current
DisablingStrategy. |
void |
removeDockActionListener(StandardDockActionListener listener)
Removes a listener from this DockStation.
|
void |
unbind(Dockable dockable)
|
protected void |
unbound(Dockable dockable)
Called by this
AbstractStandardDockAction when the Dockable
dockable will not be used in any means by this
action. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDockableRepresentation, getIcon, getIconContexts, getText, getTooltipTextcreateView, triggerprotected List<StandardDockActionListener> listeners
public AbstractStandardDockAction(boolean monitorDisabling)
monitorDisabling - whether the current DisablingStrategy should be monitoredpublic void addDockActionListener(StandardDockActionListener listener)
StandardDockActionaddDockActionListener in interface StandardDockActionlistener - The listener to addpublic void removeDockActionListener(StandardDockActionListener listener)
StandardDockActionremoveDockActionListener in interface StandardDockActionlistener - The listener to removeprotected void bound(Dockable dockable)
AbstractStandardDockAction when a Dockable
was bound to this action the first time.dockable - The Dockable that was not known to this action
before the method was invokedprotected void unbound(Dockable dockable)
AbstractStandardDockAction when the Dockable
dockable will not be used in any means by this
action. Note that the bound(Dockable)-method can be
invoked again with the dockable.dockable - The Dockable which will not by used in any way.public boolean isBound(Dockable dockable)
dockable is bound with this
action, or not.dockable - The Dockable to testtrue if it is bound, false
otherwisepublic Set<Dockable> getBoundDockables()
Dockables which are currently
bound to this DockAction.public void bind(Dockable dockable)
DockActionbind in interface DockActiondockable - the Dockable that may be used in the futureDockAction.unbind(Dockable)public void unbind(Dockable dockable)
DockActiondockable was bound
to this DockAction, and if the dockable will no longer be
used for any method calls (except bind) on
this DockAction.unbind in interface DockActiondockable - The Dockable that will never be seen again, except
it is maybe bind again.public boolean isEnabled(Dockable dockable)
DisablingStrategy.isEnabled in interface StandardDockActiondockable - The Dockable for which this action maybe
triggered.true if the user should be able to trigger
this action, false otherwiseprotected void fireActionTextChanged(Set<Dockable> dockables)
actionTextChanged-
method of all currently registered StandardDockActionListenerdockables - The set of dockables for which the text has been
changed.protected void fireActionTooltipTextChanged(Set<Dockable> dockables)
actionTooltipTextChanged-
method of all currently registered StandardDockActionListenerdockables - The set of dockables for which the tooltip has been
changed.protected void fireActionIconChanged(ActionContentModifier modifier, Set<Dockable> dockables)
actionIconChanged-
method of all currently registered StandardDockActionListenermodifier - the context in which the changed icon was used, can be null to indicate that all
icons changeddockables - The set of dockables for which the icon has been
changed.protected void fireActionEnabledChanged(Set<Dockable> dockables)
actionEnabledChanged-
method of all currently registered StandardDockActionListenerdockables - The set of dockables for which the enabled-state has been
changed.protected void fireActionRepresentativeChanged(Set<Dockable> dockables)
actionRepresentativeChanged-
method of all currently registered StandardDockActionListenerdockables - The set of dockables for which the enabled-state has been
changed.Copyright © 2017 Docking Frames. All rights reserved.