bibliothek.gui.dock.common.intern.action
Class CSelectableAction<A extends CommonSelectableAction>

java.lang.Object
  extended by bibliothek.gui.dock.common.action.CAction
      extended by bibliothek.gui.dock.common.intern.action.CDecorateableAction<A>
          extended by bibliothek.gui.dock.common.intern.action.CDropDownItem<A>
              extended by bibliothek.gui.dock.common.intern.action.CSelectableAction<A>
Type Parameters:
A - the kind of action representing this CAction
Direct Known Subclasses:
CCheckBox, CRadioButton

@FrameworkOnly
public abstract class CSelectableAction<A extends CommonSelectableAction>
extends CDropDownItem<A>

An action which is either selected or deselected.

Author:
Benjamin Sigg

Constructor Summary
protected CSelectableAction(A action)
          Creates a new action
 
Method Summary
protected abstract  void changed()
          Called when selected-state of this action changed.
 Icon getDisabledSelectedHoverIcon()
          Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled and selected.
 Icon getDisabledSelectedPressedIcon()
          Gets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled and selected.
 Icon getSelectedHoverIcon()
          Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is selected.
 Icon getSelectedIcon()
          Gets the icon that is shown when this action is selected.
 Icon getSelectedPressedIcon()
          Gets the icon which is used if the mouse is pressed over a button that represents this action and if this action is selected.
protected  void init(A action)
          Initializes this action, this method can be called only once.
 boolean isSelected()
          Tells whether this action is selected or not.
 void setDisabledSelectedHoverIcon(Icon icon)
          Sets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled and selected.
 void setDisabledSelectedPressedIcon(Icon icon)
          Sets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled and selected.
 void setSelected(boolean selected)
          Sets the selected-state.
 void setSelectedHoverIcon(Icon icon)
          Sets the icon which is used if the mouse is hovering over a button that represents this action and if this action is selected.
 void setSelectedIcon(Icon icon)
          Sets the icon that will be shown when this action is selected.
 void setSelectedPressedIcon(Icon icon)
          Sets the icon which is used if the mouse is pressed over a button that represents this action and if this action is selected.
 
Methods inherited from class bibliothek.gui.dock.common.intern.action.CDropDownItem
isDropDownSelectable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
 
Methods inherited from class bibliothek.gui.dock.common.intern.action.CDecorateableAction
addDecorateableActionListener, getAccelerator, getDisabledHoverIcon, getDisabledIcon, getDisabledPressedIcon, getHoverIcon, getIcon, getPressedIcon, getText, getTooltip, intern, isEnabled, isShowTextOnButtons, removeDecorateableActionListener, setAccelerator, setDisabledHoverIcon, setDisabledIcon, setDisabledPressedIcon, setEnabled, setHoverIcon, setIcon, setPressedIcon, setShowTextOnButtons, setText, setTooltip
 
Methods inherited from class bibliothek.gui.dock.common.action.CAction
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSelectableAction

protected CSelectableAction(A action)
Creates a new action

Parameters:
action - the internal representation
Method Detail

init

protected void init(A action)
Description copied from class: CDecorateableAction
Initializes this action, this method can be called only once.

Overrides:
init in class CDecorateableAction<A extends CommonSelectableAction>
Parameters:
action - the internal representation

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

setSelectedHoverIcon

public void setSelectedHoverIcon(Icon icon)
Sets the icon which is used if the mouse is hovering over a button that represents this action and if this action is selected.

Parameters:
icon - the icon or null

getSelectedHoverIcon

public Icon getSelectedHoverIcon()
Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is selected.

Returns:
the icon or null

setSelectedPressedIcon

public void setSelectedPressedIcon(Icon icon)
Sets the icon which is used if the mouse is pressed over a button that represents this action and if this action is selected.

Parameters:
icon - the icon or null

getSelectedPressedIcon

public Icon getSelectedPressedIcon()
Gets the icon which is used if the mouse is pressed over a button that represents this action and if this action is selected.

Returns:
the icon, can be null

setDisabledSelectedHoverIcon

public void setDisabledSelectedHoverIcon(Icon icon)
Sets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled and selected.

Parameters:
icon - the icon or null

getDisabledSelectedHoverIcon

public Icon getDisabledSelectedHoverIcon()
Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is disabled and selected.

Returns:
the icon or null

setDisabledSelectedPressedIcon

public void setDisabledSelectedPressedIcon(Icon icon)
Sets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled and selected.

Parameters:
icon - the icon or null

getDisabledSelectedPressedIcon

public Icon getDisabledSelectedPressedIcon()
Gets the icon which is used if the mouse is pressed over a button that represents this action and if this action is disabled and selected.

Returns:
the icon, can be null