public abstract class DropDownFilter extends Object implements DropDownView
DropDownAction
, but
have to show elements of the selected action as well.DropDownView
which forwards their properties to another
DropDownView. The filter may cache some values, but has to forward them if the
update
-method is invoked.Constructor and Description |
---|
DropDownFilter(Dockable dockable,
DropDownAction action,
DropDownView view)
Creates a new filter
|
Modifier and Type | Method and Description |
---|---|
void |
bind()
Invoked before this filter is used
|
DropDownAction |
getAction()
Gets the action that is filtered.
|
Dockable |
getDockable()
|
DropDownView |
getView()
Gets a
DropDownView in which this filter has to write its
properties when update(DropDownViewItem) is invoked. |
void |
unbind()
Invoked when this filter is no longer used
|
abstract void |
update(DropDownViewItem selection)
Updates all properties using the current selection of a button.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearIcons, getIconContexts, setDockableRepresentation, setEnabled, setIcon, setSelected, setText, setTooltip
public DropDownFilter(Dockable dockable, DropDownAction action, DropDownView view)
dockable
- the owner of the viewaction
- the action that is filteredview
- a view where this filter should write intopublic Dockable getDockable()
public DropDownAction getAction()
public DropDownView getView()
DropDownView
in which this filter has to write its
properties when update(DropDownViewItem)
is invoked. The view
should be seen as a thing like a button or a menu item.public void bind()
public void unbind()
public abstract void update(DropDownViewItem selection)
selection
- the selection