bibliothek.gui.dock.common.intern.action
Class CSelectableAction

java.lang.Object
  extended by bibliothek.gui.dock.common.action.CAction
      extended by bibliothek.gui.dock.common.intern.action.CDecorateableAction
          extended by bibliothek.gui.dock.common.intern.action.CDropDownItem
              extended by bibliothek.gui.dock.common.intern.action.CSelectableAction
Direct Known Subclasses:
CCheckBox, CRadioButton

@FrameworkOnly
public abstract class CSelectableAction
extends CDropDownItem

An action which is either selected or deselected.

Author:
Benjamin Sigg

Constructor Summary
protected CSelectableAction(SimpleSelectableAction action)
          Creates a new action
 
Method Summary
protected abstract  void changed()
          Called when selected-state of this action changed.
 Icon getSelectedIcon()
          Gets the icon that is shown when this action is selected.
 boolean isSelected()
          Tells whether this action is selected or not.
 void setSelected(boolean selected)
          Sets the selected-state.
 void setSelectedIcon(Icon icon)
          Sets the icon that will be shown when this action is selected.
 
Methods inherited from class bibliothek.gui.dock.common.intern.action.CDropDownItem
init, isDropDownSelectable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
 
Methods inherited from class bibliothek.gui.dock.common.intern.action.CDecorateableAction
getAccelerator, getDisabledIcon, getIcon, getText, getTooltip, init, isEnabled, setAccelerator, setDisabledIcon, setEnabled, setIcon, setText, setTooltip
 
Methods inherited from class bibliothek.gui.dock.common.action.CAction
init, intern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSelectableAction

protected CSelectableAction(SimpleSelectableAction action)
Creates a new action

Parameters:
action - the internal representation
Method Detail

changed

protected abstract void changed()
Called when selected-state of this action changed.


setSelected

public void setSelected(boolean selected)
Sets the selected-state.

Parameters:
selected - the new state

isSelected

public boolean isSelected()
Tells whether this action is selected or not.

Returns:
true if the action is selected

setSelectedIcon

public void setSelectedIcon(Icon icon)
Sets the icon that will be shown when this action is selected.

Parameters:
icon - the icon or null

getSelectedIcon

public Icon getSelectedIcon()
Gets the icon that is shown when this action is selected.

Returns:
the icon or null