Class CSelectableAction<A extends CommonSelectableAction>
java.lang.Object
bibliothek.gui.dock.common.action.CAction
bibliothek.gui.dock.common.intern.action.CDecorateableAction<A>
bibliothek.gui.dock.common.intern.action.CDropDownItem<A>
bibliothek.gui.dock.common.intern.action.CSelectableAction<A>
- Type Parameters:
A- the kind of action representing thisCAction
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidchanged()Called whenselected-state of this action changed.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.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.Gets the icon which is used if the mouse is hovering over a button that represents this action and if this action is selected.Gets the icon that is shown when this action is selected.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 voidInitializes this action, this method can be called only once.booleanTells whether this action is selected or not.voidSets 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.voidSets 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.voidsetSelected(boolean selected) Sets the selected-state.voidsetSelectedHoverIcon(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.voidsetSelectedIcon(Icon icon) Sets the icon that will be shown when this action is selected.voidsetSelectedPressedIcon(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, setDropDownTriggerableSelectedMethods inherited from class bibliothek.gui.dock.common.intern.action.CDecorateableAction
addDecorateableActionListener, getAccelerator, getDisabledHoverIcon, getDisabledIcon, getDisabledPressedIcon, getHoverIcon, getIcon, getPressedIcon, getText, getTooltip, intern, isAcceleratorGlobal, isEnabled, isShowTextOnButtons, removeDecorateableActionListener, setAccelerator, setAcceleratorIsGlobal, setDisabledHoverIcon, setDisabledIcon, setDisabledPressedIcon, setEnabled, setHoverIcon, setIcon, setPressedIcon, setShowTextOnButtons, setText, setTooltip
-
Constructor Details
-
CSelectableAction
Creates a new action- Parameters:
action- the internal representation
-
-
Method Details
-
init
Description copied from class:CDecorateableActionInitializes this action, this method can be called only once.- Overrides:
initin classCDecorateableAction<A extends CommonSelectableAction>- Parameters:
action- the internal representation
-
changed
protected abstract void changed()Called whenselected-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:
trueif the action is selected
-
setSelectedIcon
Sets the icon that will be shown when this action is selected.- Parameters:
icon- the icon ornull
-
getSelectedIcon
Gets the icon that is shown when this action is selected.- Returns:
- the icon or
null
-
setSelectedHoverIcon
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 ornull
-
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
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 ornull
-
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
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 ornull
-
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
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 ornull
-
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
-