bibliothek.gui.dock.station.stack.tab
Interface TabContentFilter

All Known Implementing Classes:
AbstractTabContentFilter, DefaultTabContentFilter

public interface TabContentFilter

This interface tells a StackDockStation or a StackDockComponent how to fill the tabs for its children. Note that if a StackDockStation is using a StackDockComponent, this filter gets not informed about the existence of the StackDockComponent. However some other modules using a StackDockComponent may decide to register them directly.

Author:
Benjamin Sigg
See Also:
StackDockStation.TAB_CONTENT_FILTER

Method Summary
 void addListener(TabContentFilterListener listener)
          Adds a listener to this filter.
 TabContent filter(TabContent content, StackDockComponent component, Dockable dockable)
          Filters the contents of a tab.
 TabContent filter(TabContent content, StackDockStation station, Dockable dockable)
          Filters the contents of a tab.
 void install(StackDockComponent component)
          Informs this filter that it will be used by component.
 void install(StackDockStation station)
          Informs this filter that it will be used by station.
 void removeListener(TabContentFilterListener listener)
          Removes a listener from this filter.
 void uninstall(StackDockComponent component)
          Informs this filter that it is no longer used by component.
 void uninstall(StackDockStation station)
          Informs this filter that it is no longer used by station.
 

Method Detail

install

void install(StackDockStation station)
Informs this filter that it will be used by station.

Parameters:
station - a new client

install

void install(StackDockComponent component)
Informs this filter that it will be used by component. Note that this method may not be called if the component itself is used by a StackDockStation.

Parameters:
component - a new client

uninstall

void uninstall(StackDockStation station)
Informs this filter that it is no longer used by station.

Parameters:
station - an old client

uninstall

void uninstall(StackDockComponent component)
Informs this filter that it is no longer used by component.

Parameters:
component - the old component

addListener

void addListener(TabContentFilterListener listener)
Adds a listener to this filter. The listener can be called if this filter changes its behavior.

Parameters:
listener - the new listener, not null

removeListener

void removeListener(TabContentFilterListener listener)
Removes a listener from this filter.

Parameters:
listener - the listener to remove

filter

TabContent filter(TabContent content,
                  StackDockStation station,
                  Dockable dockable)
Filters the contents of a tab.

Parameters:
content - the default content to use, not null
station - the station which calls this method
dockable - the element which is displayed
Returns:
the content to show, may be null

filter

TabContent filter(TabContent content,
                  StackDockComponent component,
                  Dockable dockable)
Filters the contents of a tab.

Parameters:
content - the default content to use, not null
component - the component which calls this method
dockable - the element which is displayed
Returns:
the content to show, may be null