public abstract class SimpleBooleanAction extends SimpleAction
description, icon, namechangeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
SimpleBooleanAction(String
Create a SimpleBooleanAction that provides name and description
|
SimpleBooleanAction(String
Create a SimpleBooleanAction that provides name, description and an icon
|
SimpleBooleanAction(String
Create a SimpleBooleanAction that provides name, description and an icon
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent
|
abstract boolean |
getState()
|
Object |
getValue(String
|
abstract void |
toggleState()
implement what happens when the state is toggled.
|
setDescription, setIcon, setIcon, setNameaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic SimpleBooleanAction(Stringname, String description)
name - the name of the action
description - the short description of the action
public SimpleBooleanAction(Stringname, String description, Icon icon)
name - the name of the action
description - the short description of the action
icon - the icon used in menus
public SimpleBooleanAction(Stringname, String description, String resourceIcon)
name - the name of the action
description - the short description of the action
resourceIcon - a resource to decode the icon used in menus from
public abstract boolean getState()
public abstract void toggleState()
public void actionPerformed(ActionEvente)