public abstract static class GeneiousAction.ToggleAction extends GeneiousAction
GeneiousAction.Divider, GeneiousAction.SubMenu, GeneiousAction.ToggleAction| Modifier and Type | Field and Description |
|---|---|
static String |
TOGGLED_PROPERTY_NAME
The name of the property for which a propertyChange event is fired when the action is toggled
|
DESC, ICON, NAMEchangeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Modifier | Constructor and Description |
|---|---|
|
GeneiousAction.ToggleAction(GeneiousAction.ToggleAction internalAction)
Creates a ToggleAction that wraps another toggle action.
|
protected |
GeneiousAction.ToggleAction(GeneiousActionOptions actionOptions)
Construct a Toggle action with its properties specified by the GeneiousActionOptions
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
abstract void |
actionToggled(ActionEvent e,
boolean isSelected)
Called when the action is performed, indicating that the selected state of the action has changed.
|
boolean |
isSelected()
Whether or not this action is selected
|
void |
setSelected(boolean isSelected)
Set the selected state of the action
|
asMenuItem, asToolbarButton, equals, getActionsInMainMenuOrder, getActionsInPopupMenuOrder, getActionsInToolbarOrder, getCategory, getDescription, getIcon16, getIcon24, getIcon32, getIdentifier, getMainMenuLocation, getName, getOptions, getShortcut, hashCode, isEnabled, isInMainToolbar, isInPopupMenu, isProOnly, setDescription, setEnabled, setIcons, setInMainToolbar, setInMainToolbar, setInPopupMenu, setInPopupMenu, setMainMenuLocation, setMainMenuLocation, setName, setProOnly, setShortcutKey, toStringaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListenerpublic static final String TOGGLED_PROPERTY_NAME
protected GeneiousAction.ToggleAction(GeneiousActionOptions actionOptions)
actionOptions - GeneiousActionOptions specifying the properties of this action.public GeneiousAction.ToggleAction(GeneiousAction.ToggleAction internalAction)
internalAction.setSelected(isSelected); internalAction.actionToggled(e, isSelected);
internalAction - the internal ToggleAction that all methods are delegated to.public boolean isSelected()
public void setSelected(boolean isSelected)
isSelected - true to have the action selected (checked if a check-box menu item, toggled on if a button), false otherwise.public final void actionPerformed(ActionEvent e)
public abstract void actionToggled(ActionEvent e, boolean isSelected)
e - ActionEvent fired by the componentisSelected - the new selection state of the action