org.xnap.action
Class AbstractTogglePrefAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.xnap.action.AbstractToggleAction
          extended by org.xnap.action.AbstractTogglePrefAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ToggleAction
Direct Known Subclasses:
MaintainSortOrderAction, RemoveFailedServersAction, ShowChatPanelAction, ShowHotlistAction, ShowLibraryPanelAction, ShowMainToolBarAction, UseAutoConnectorAction, UseSocksProxyAction, UseTabbedPaneAction, UseTabbedTransferPaneAction

public abstract class AbstractTogglePrefAction
extends AbstractToggleAction
implements java.beans.PropertyChangeListener

Provides a default implementation for a toggle action that monitors a boolean preference key.

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
AbstractTogglePrefAction(PreferencesProvider prefs, java.lang.String prefsKey)
          Constructs a toggle action that monitors a boolean preference key.
AbstractTogglePrefAction(java.lang.String prefsKey)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 
Methods inherited from class org.xnap.action.AbstractToggleAction
isSelected, setSelected, toggled
 
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
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

AbstractTogglePrefAction

public AbstractTogglePrefAction(PreferencesProvider prefs,
                                java.lang.String prefsKey)
Constructs a toggle action that monitors a boolean preference key.

Parameters:
prefsKey - the key to monitor

AbstractTogglePrefAction

public AbstractTogglePrefAction(java.lang.String prefsKey)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class AbstractToggleAction

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener


Copyright © 2001-2005 XNap Team. All Rights Reserved.