public abstract class AbstractButtonContentFilter extends Object implements ButtonContentFilter
ButtonContentFilter
implementing all methods except
the filter algorithm itself.ALWAYS, NEVER
Constructor and Description |
---|
AbstractButtonContentFilter() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ButtonContentFilterListener listener)
Adds the observer
listener to this filter. |
protected void |
fire(Dockable dockable,
DockAction action)
Calls
ButtonContentFilterListener.showTextChanged(ButtonContentFilter, Dockable, DockAction) on all
listeners that are currently registered |
void |
install(Dockable dockable,
DockAction action)
Informs this filter that
action which is connected to dockable will
be shown. |
protected void |
installed(DockAction action)
Called the first time
action is installed. |
protected void |
installed(DockAction action,
Dockable dockable)
Called the first time
dockable and action are installed. |
void |
removeListener(ButtonContentFilterListener listener)
Removes the observer
listener from this filter. |
void |
uninstall(Dockable dockable,
DockAction action)
Informs this filter that
action will no longer be shown. |
protected void |
uninstalled(DockAction action)
Called after
action was uninstalled the last time. |
protected void |
uninstalled(DockAction action,
Dockable dockable)
Called after
dockable and action have been uninstalled the last time. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
showText
public void addListener(ButtonContentFilterListener listener)
ButtonContentFilter
listener
to this filter. The listener must be called if
the result of ButtonContentFilter.showText(Dockable, DockAction)
changes.addListener
in interface ButtonContentFilter
listener
- the new listenerpublic void removeListener(ButtonContentFilterListener listener)
ButtonContentFilter
listener
from this filter.removeListener
in interface ButtonContentFilter
listener
- the observer that is no longer shownprotected void fire(Dockable dockable, DockAction action)
ButtonContentFilterListener.showTextChanged(ButtonContentFilter, Dockable, DockAction)
on all
listeners that are currently registereddockable
- the dockable for which the result of ButtonContentFilter.showText(Dockable, DockAction)
changed, can be null
action
- the action for which the result of ButtonContentFilter.showText(Dockable, DockAction)
changed, can be null
protected void installed(DockAction action, Dockable dockable)
dockable
and action
are installed.action
- the newly installed actiondockable
- the newly installed dockableprotected void installed(DockAction action)
action
is installed.action
- the newly installed actionprotected void uninstalled(DockAction action, Dockable dockable)
dockable
and action
have been uninstalled the last time.action
- the action that has been uninstalleddockable
- the dockable that has been uninstalledprotected void uninstalled(DockAction action)
action
was uninstalled the last time.action
- the action that has been uninstalledpublic void install(Dockable dockable, DockAction action)
ButtonContentFilter
action
which is connected to dockable
will
be shown. This method may be called more then once, if the action is shown in more than one
place.install
in interface ButtonContentFilter
dockable
- the element whose action is going to show upaction
- the action that is going to show uppublic void uninstall(Dockable dockable, DockAction action)
ButtonContentFilter
action
will no longer be shown. This method may be called
more than once if action
is shown at more than one place.uninstall
in interface ButtonContentFilter
dockable
- the element whose action is going to be hiddenaction
- the action that is no longer showing up