public abstract class AbstractDropDownFilter extends DropDownFilter
DropDownFilter
which stores all properties. The properties can
be read by subclasses.Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled
whether the selected element is enabled
|
protected Map<ActionContentModifier,Icon> |
icons
the icons provided by the selected element
|
protected Dockable |
representative
the
Dockable which is represented by this view |
protected boolean |
selected
whether the selected element is selected
|
protected String |
text
the text of the selected element
|
protected String |
tooltip
the tooltip of the selected element
|
Constructor and Description |
---|
AbstractDropDownFilter(DropDownAction action,
Dockable dockable,
DropDownView view)
Creates a new filter.
|
Modifier and Type | Method and Description |
---|---|
void |
clearIcons()
|
protected Icon |
getIcon(ActionContentModifier modifier)
Gets the icon which was stored using
setIcon(ActionContentModifier, Icon) . |
void |
setDockableRepresentation(Dockable dockable)
Sets the
Dockable which is represented by the view. |
void |
setEnabled(boolean enabled)
Sets the enabled-state of the button.
|
void |
setIcon(ActionContentModifier modifier,
Icon icon)
Sets the icon of the button.
|
void |
setSelected(boolean selected)
Sets the selected-state of the button.
|
void |
setText(String text)
Sets the text of the button.
|
void |
setTooltip(String tooltip)
Sets the tooltip of the button.
|
bind, getAction, getDockable, getView, unbind, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIconContexts
protected Map<ActionContentModifier,Icon> icons
protected boolean enabled
protected boolean selected
protected String text
protected String tooltip
public AbstractDropDownFilter(DropDownAction action, Dockable dockable, DropDownView view)
action
- the action to filterdockable
- the owner of action
.view
- the view in which this action will write its propertiespublic void setIcon(ActionContentModifier modifier, Icon icon)
DropDownView
modifier
- the context in which the icon is used, not null
icon
- the iconpublic void clearIcons()
DropDownView
protected Icon getIcon(ActionContentModifier modifier)
setIcon(ActionContentModifier, Icon)
.modifier
- the context in which to use the iconnull
public void setEnabled(boolean enabled)
DropDownView
enabled
- the statepublic void setSelected(boolean selected)
DropDownView
selected
- the statepublic void setText(String text)
DropDownView
text
- the textpublic void setTooltip(String tooltip)
DropDownView
tooltip
- the tooltippublic void setDockableRepresentation(Dockable dockable)
DropDownView
Dockable
which is represented by the view.dockable
- the represented element, can be null