de.sciss.gui
Class BooleanPrefsMenuAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.sciss.gui.MenuAction
          extended by de.sciss.gui.PrefMenuAction
              extended by de.sciss.gui.BooleanPrefsMenuAction
All Implemented Interfaces:
LaterInvocationManager.Listener, PreferenceEntrySync, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, java.util.prefs.PreferenceChangeListener, javax.swing.Action

public class BooleanPrefsMenuAction
extends PrefMenuAction

Adds PreferenceEntrySync functionality to the superclass note that unlike PrefCheckBox and the like, it's only valid to listen to the prefs changes, not the action events

Version:
0.10, 10-Sep-06
Author:
Hanns Holger Rutz
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, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
BooleanPrefsMenuAction(java.lang.String text, javax.swing.KeyStroke shortcut)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Switches button state and updates preferences.
protected  void readPrefsFromString(java.lang.String prefsValue)
           
 void setCheckItem(MenuCheckItem mci)
           
 void writePrefs()
           
 
Methods inherited from class de.sciss.gui.PrefMenuAction
canWritePrefs, getPreferenceKey, getPreferenceNode, getReadPrefs, getWritePrefs, laterInvocation, preferenceChange, readPrefs, setPreferenceKey, setPreferenceNode, setPreferences, setReadPrefs, setWritePrefs, shouldWritePrefs
 
Methods inherited from class de.sciss.gui.MenuAction
deinstallFrom, installOn, mimic
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanPrefsMenuAction

public BooleanPrefsMenuAction(java.lang.String text,
                              javax.swing.KeyStroke shortcut)
Method Detail

setCheckItem

public void setCheckItem(MenuCheckItem mci)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Switches button state and updates preferences.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class MenuAction

writePrefs

public void writePrefs()

readPrefsFromString

protected void readPrefsFromString(java.lang.String prefsValue)
Specified by:
readPrefsFromString in class PrefMenuAction