@Deprecated public abstract class BooleanStateAction extends SystemAction implements Presenter.Menu, Presenter.Popup, Presenter.Toolbar
BooleanStateAction.PROP_BOOLEAN_STATE property.
The default value of the state is true (on).
This action is not the most effective way to implement checkbox in a menu. Consider using more modern alternative: Actions.checkbox, or declarative ActionState annotation.
Presenter.Menu, Presenter.Popup, Presenter.Toolbar| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_BOOLEAN_STATE
Deprecated.
Name of property hold the state of the action.
|
PROP_ENABLED, PROP_ICONACCELERATOR_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 |
|---|
BooleanStateAction()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent ev)
Deprecated.
Actually perform the action.
|
boolean |
getBooleanState()
Deprecated.
Get the current state.
|
JMenuItem |
getMenuPresenter()
Deprecated.
Get a menu item that can present this action in a
JMenu. |
JMenuItem |
getPopupPresenter()
Deprecated.
Get a menu item that can present this action in a
JPopupMenu. |
Component |
getToolbarPresenter()
Deprecated.
Get a component that can present this action in a
JToolBar. |
protected void |
initialize()
Deprecated.
Initialize the action.
|
void |
setBooleanState(boolean value)
Deprecated.
Set the current state.
|
clearSharedData, createPopupMenu, createToolbarPresenter, get, getHelpCtx, getIcon, getIcon, getName, getValue, iconResource, isEnabled, linkActions, putValue, setEnabled, setIconaddNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removeNotify, removePropertyChangeListener, reset, writeExternal, writeReplaceclone, getClass, notify, notifyAll, toString, wait, wait, waitaccept, addPropertyChangeListener, removePropertyChangeListenerpublic static final String PROP_BOOLEAN_STATE
public JMenuItem getMenuPresenter()
Presenter.MenuJMenu.
If your menu content is dynamic in nature, consider using DynamicMenuContentgetMenuPresenter in interface Presenter.Menupublic JMenuItem getPopupPresenter()
Presenter.PopupJPopupMenu.
If your menu content is dynamic in nature, consider using DynamicMenuContentgetPopupPresenter in interface Presenter.Popuppublic Component getToolbarPresenter()
Presenter.ToolbarJToolBar.getToolbarPresenter in interface Presenter.Toolbarpublic boolean getBooleanState()
true if onpublic void setBooleanState(boolean value)
value - true to turn on, false to turn offprotected void initialize()
SystemActioninitialize in class SystemActionpublic void actionPerformed(ActionEvent ev)
SystemActionActionListener.actionPerformed(java.awt.event.ActionEvent).
In some cases, the implementation may have an empty body, if the presenters handle the performing of the action in a different way than by calling this method.
Since 4.11, will be performed directly in the event thread.
actionPerformed in interface ActionListeneractionPerformed in class SystemActionev - the event triggering the action