bibliothek.gui.dock.action.dropdown
Class AbstractDropDownFilter

java.lang.Object
  extended by bibliothek.gui.dock.action.dropdown.DropDownFilter
      extended by bibliothek.gui.dock.action.dropdown.AbstractDropDownFilter
All Implemented Interfaces:
DropDownView
Direct Known Subclasses:
DefaultDropDownFilter

public abstract class AbstractDropDownFilter
extends DropDownFilter

A DropDownFilter which stores all properties. The properties can be read by subclasses.

Author:
Benjamin Sigg

Field Summary
protected  javax.swing.Icon disabledIcon
          the disabled icon provided by the selected element
protected  boolean enabled
          whether the selected element is enabled
protected  javax.swing.Icon icon
          the icon 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  java.lang.String text
          the text of the selected element
protected  java.lang.String tooltip
          the tooltip of the selected element
 
Constructor Summary
AbstractDropDownFilter(DropDownAction action, Dockable dockable, DropDownView view)
          Creates a new filter.
 
Method Summary
 void setDisabledIcon(javax.swing.Icon icon)
          Sets the disabled icon of the button.
 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(javax.swing.Icon icon)
          Sets the icon of the button.
 void setSelected(boolean selected)
          Sets the selected-state of the button.
 void setText(java.lang.String text)
          Sets the text of the button.
 void setTooltip(java.lang.String tooltip)
          Sets the tooltip of the button.
 
Methods inherited from class bibliothek.gui.dock.action.dropdown.DropDownFilter
bind, getAction, getDockable, getView, unbind, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

icon

protected javax.swing.Icon icon
the icon provided by the selected element


disabledIcon

protected javax.swing.Icon disabledIcon
the disabled icon provided by the selected element


enabled

protected boolean enabled
whether the selected element is enabled


selected

protected boolean selected
whether the selected element is selected


text

protected java.lang.String text
the text of the selected element


tooltip

protected java.lang.String tooltip
the tooltip of the selected element


representative

protected Dockable representative
the Dockable which is represented by this view

Constructor Detail

AbstractDropDownFilter

public AbstractDropDownFilter(DropDownAction action,
                              Dockable dockable,
                              DropDownView view)
Creates a new filter.

Parameters:
action - the action to filter
dockable - the owner of action.
view - the view in which this action will write its properties
Method Detail

setDisabledIcon

public void setDisabledIcon(javax.swing.Icon icon)
Description copied from interface: DropDownView
Sets the disabled icon of the button.

Parameters:
icon - the disabled icon

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: DropDownView
Sets the enabled-state of the button.

Parameters:
enabled - the state

setIcon

public void setIcon(javax.swing.Icon icon)
Description copied from interface: DropDownView
Sets the icon of the button.

Parameters:
icon - the icon

setSelected

public void setSelected(boolean selected)
Description copied from interface: DropDownView
Sets the selected-state of the button.

Parameters:
selected - the state

setText

public void setText(java.lang.String text)
Description copied from interface: DropDownView
Sets the text of the button.

Parameters:
text - the text

setTooltip

public void setTooltip(java.lang.String tooltip)
Description copied from interface: DropDownView
Sets the tooltip of the button.

Parameters:
tooltip - the tooltip

setDockableRepresentation

public void setDockableRepresentation(Dockable dockable)
Description copied from interface: DropDownView
Sets the Dockable which is represented by the view.

Parameters:
dockable - the represented element, can be null