Package org.esa.snap.rcp.util
Class BooleanPreferenceKeyAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.esa.snap.rcp.util.BooleanPreferenceKeyAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,PreferenceChangeListener
,Action
,org.openide.util.actions.Presenter
,org.openide.util.actions.Presenter.Menu
,org.openide.util.actions.Presenter.Popup
,org.openide.util.actions.Presenter.Toolbar
- Direct Known Subclasses:
GroupByNodeTypeAction
,StatusbarAction
,SyncImageCursorsAction
,SyncImageViewsAction
public class BooleanPreferenceKeyAction extends AbstractAction implements PreferenceChangeListener, org.openide.util.actions.Presenter.Toolbar, org.openide.util.actions.Presenter.Menu, org.openide.util.actions.Presenter.Popup
An action which sets a boolean preference value.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BooleanPreferenceKeyAction(String preferenceKey)
protected
BooleanPreferenceKeyAction(String preferenceKey, boolean defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
JMenuItem
getMenuPresenter()
JMenuItem
getPopupPresenter()
String
getPreferenceKey()
Component
getToolbarPresenter()
boolean
isSelected()
void
preferenceChange(PreferenceChangeEvent evt)
void
setSelected(boolean selected)
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
getPreferenceKey
public String getPreferenceKey()
-
isSelected
public boolean isSelected()
-
setSelected
public void setSelected(boolean selected)
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interfaceActionListener
-
getMenuPresenter
public JMenuItem getMenuPresenter()
- Specified by:
getMenuPresenter
in interfaceorg.openide.util.actions.Presenter.Menu
-
getPopupPresenter
public JMenuItem getPopupPresenter()
- Specified by:
getPopupPresenter
in interfaceorg.openide.util.actions.Presenter.Popup
-
getToolbarPresenter
public Component getToolbarPresenter()
- Specified by:
getToolbarPresenter
in interfaceorg.openide.util.actions.Presenter.Toolbar
-
preferenceChange
public void preferenceChange(PreferenceChangeEvent evt)
- Specified by:
preferenceChange
in interfacePreferenceChangeListener
-
-