public class DefaultTabContentFilter extends AbstractTabContentFilter
TabContentFilter
offers a set of predefined behavioral patterns.Modifier and Type | Class and Description |
---|---|
static class |
DefaultTabContentFilter.Behavior
Tells a
DefaultTabContentFilter how it behaves. |
components, stations
Constructor and Description |
---|
DefaultTabContentFilter()
Creates a new filter using the behavior
DefaultTabContentFilter.Behavior.ALL . |
DefaultTabContentFilter(DefaultTabContentFilter.Behavior behavior)
Creates a new filter.
|
DefaultTabContentFilter(DefaultTabContentFilter.Behavior selected,
DefaultTabContentFilter.Behavior deselected)
Creates a new filter.
|
Modifier and Type | Method and Description |
---|---|
protected void |
deselected(StackDockStation station,
Dockable dockable)
Called when the selection of
station changed to another dockable than oldSelection . |
TabContent |
filter(TabContent content,
StackDockComponent component,
Dockable dockable)
This implementation just returns
content . |
TabContent |
filter(TabContent content,
StackDockStation station,
Dockable dockable)
This implementation just returns
content . |
DefaultTabContentFilter.Behavior |
getDeselected()
Gets the behavior that is applied to unselected elements.
|
DefaultTabContentFilter.Behavior |
getSelected()
Gets the behavior that is applied to selected elements.
|
protected void |
selected(StackDockStation station,
Dockable dockable)
Called when the selection of
station changed to newSelection . |
protected void |
selectionChanged(StackDockComponent component)
Called if the selection of
component changed. |
void |
setDeselected(DefaultTabContentFilter.Behavior deselected)
Sets the behavior that should be applied on an unselected element.
|
void |
setSelected(DefaultTabContentFilter.Behavior selected)
Sets the behavior that should be applied on a selected element.
|
added, addListener, fireChanged, fireChanged, fireChanged, fireChanged, install, install, listeners, removed, removeListener, uninstall, uninstall
public DefaultTabContentFilter()
DefaultTabContentFilter.Behavior.ALL
.public DefaultTabContentFilter(DefaultTabContentFilter.Behavior behavior)
behavior
- the behavior applied to all elementspublic DefaultTabContentFilter(DefaultTabContentFilter.Behavior selected, DefaultTabContentFilter.Behavior deselected)
selected
- the behavior applied to selected elementsdeselected
- the behavior applied to unselected elementspublic void setSelected(DefaultTabContentFilter.Behavior selected)
selected
- the new behavior, not null
public DefaultTabContentFilter.Behavior getSelected()
null
public void setDeselected(DefaultTabContentFilter.Behavior deselected)
deselected
- the new behavior, not null
public DefaultTabContentFilter.Behavior getDeselected()
null
public TabContent filter(TabContent content, StackDockStation station, Dockable dockable)
AbstractTabContentFilter
content
.filter
in interface TabContentFilter
filter
in class AbstractTabContentFilter
content
- the default content to use, not null
station
- the station which calls this methoddockable
- the element which is displayednull
public TabContent filter(TabContent content, StackDockComponent component, Dockable dockable)
AbstractTabContentFilter
content
.filter
in interface TabContentFilter
filter
in class AbstractTabContentFilter
content
- the default content to use, not null
component
- the component which calls this methoddockable
- the element which is displayednull
protected void selected(StackDockStation station, Dockable dockable)
AbstractTabContentFilter
station
changed to newSelection
.selected
in class AbstractTabContentFilter
station
- the owner of newSelection
dockable
- the new selection, not null
protected void deselected(StackDockStation station, Dockable dockable)
AbstractTabContentFilter
station
changed to another dockable than oldSelection
.deselected
in class AbstractTabContentFilter
station
- the owner of oldSelection
dockable
- the old selection, not null
protected void selectionChanged(StackDockComponent component)
AbstractTabContentFilter
component
changed.selectionChanged
in class AbstractTabContentFilter
component
- the component whose selection changed