bibliothek.gui.dock.action
Class AbstractButtonContentFilter

java.lang.Object
  extended by bibliothek.gui.dock.action.AbstractButtonContentFilter
All Implemented Interfaces:
ButtonContentFilter
Direct Known Subclasses:
CButtonContentFilter

public abstract class AbstractButtonContentFilter
extends Object
implements ButtonContentFilter

An abstract implementation of ButtonContentFilter implementing all methods except the filter algorithm itself.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.action.ButtonContentFilter
ALWAYS, NEVER
 
Constructor Summary
AbstractButtonContentFilter()
           
 
Method Summary
 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.
 
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.action.ButtonContentFilter
showText
 

Constructor Detail

AbstractButtonContentFilter

public AbstractButtonContentFilter()
Method Detail

addListener

public void addListener(ButtonContentFilterListener listener)
Description copied from interface: ButtonContentFilter
Adds the observer listener to this filter. The listener must be called if the result of ButtonContentFilter.showText(Dockable, DockAction) changes.

Specified by:
addListener in interface ButtonContentFilter
Parameters:
listener - the new listener

removeListener

public void removeListener(ButtonContentFilterListener listener)
Description copied from interface: ButtonContentFilter
Removes the observer listener from this filter.

Specified by:
removeListener in interface ButtonContentFilter
Parameters:
listener - the observer that is no longer shown

fire

protected void fire(Dockable dockable,
                    DockAction action)
Calls ButtonContentFilterListener.showTextChanged(ButtonContentFilter, Dockable, DockAction) on all listeners that are currently registered

Parameters:
dockable - 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

installed

protected void installed(DockAction action,
                         Dockable dockable)
Called the first time dockable and action are installed.

Parameters:
action - the newly installed action
dockable - the newly installed dockable

installed

protected void installed(DockAction action)
Called the first time action is installed.

Parameters:
action - the newly installed action

uninstalled

protected void uninstalled(DockAction action,
                           Dockable dockable)
Called after dockable and action have been uninstalled the last time.

Parameters:
action - the action that has been uninstalled
dockable - the dockable that has been uninstalled

uninstalled

protected void uninstalled(DockAction action)
Called after action was uninstalled the last time.

Parameters:
action - the action that has been uninstalled

install

public void install(Dockable dockable,
                    DockAction action)
Description copied from interface: ButtonContentFilter
Informs this filter that 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.

Specified by:
install in interface ButtonContentFilter
Parameters:
dockable - the element whose action is going to show up
action - the action that is going to show up

uninstall

public void uninstall(Dockable dockable,
                      DockAction action)
Description copied from interface: ButtonContentFilter
Informs this filter that action will no longer be shown. This method may be called more than once if action is shown at more than one place.

Specified by:
uninstall in interface ButtonContentFilter
Parameters:
dockable - the element whose action is going to be hidden
action - the action that is no longer showing up