javax.swing
Class JSpinner.DisabledAction

java.lang.Object
  extended byjavax.swing.JSpinner.DisabledAction
All Implemented Interfaces:
Action, ActionListener, EventListener
Enclosing class:
JSpinner

private static class JSpinner.DisabledAction
extends Object
implements Action

An Action implementation that is always disabled.


Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
private JSpinner.DisabledAction()
           
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Invoked when an action occurs.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChange listener.
 Object getValue(String key)
          Gets one of this object's properties using the associated key.
 boolean isEnabled()
          Returns the enabled state of the Action.
 void putValue(String key, Object value)
          Sets one of this object's properties using the associated key.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChange listener.
 void setEnabled(boolean b)
          Sets the enabled state of the Action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpinner.DisabledAction

private JSpinner.DisabledAction()
Method Detail

getValue

public Object getValue(String key)
Description copied from interface: Action
Gets one of this object's properties using the associated key.

Specified by:
getValue in interface Action
See Also:
Action.putValue(java.lang.String, java.lang.Object)

putValue

public void putValue(String key,
                     Object value)
Description copied from interface: Action
Sets one of this object's properties using the associated key. If the value has changed, a PropertyChangeEvent is sent to listeners.

Specified by:
putValue in interface Action
Parameters:
key - a String containing the key
value - an Object value

setEnabled

public void setEnabled(boolean b)
Description copied from interface: Action
Sets the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method. If the value has changed, a PropertyChangeEvent is sent to listeners.

Specified by:
setEnabled in interface Action
Parameters:
b - true to enable this Action, false to disable it

isEnabled

public boolean isEnabled()
Description copied from interface: Action
Returns the enabled state of the Action. When enabled, any component associated with this object is active and able to fire this object's actionPerformed method.

Specified by:
isEnabled in interface Action
Returns:
true if this Action is enabled

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: Action
Adds a PropertyChange listener. Containers and attached components use these methods to register interest in this Action object. When its enabled state or other property changes, the registered listeners are informed of the change.

Specified by:
addPropertyChangeListener in interface Action
Parameters:
l - a PropertyChangeListener object

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: Action
Removes a PropertyChange listener.

Specified by:
removePropertyChangeListener in interface Action
Parameters:
l - a PropertyChangeListener object
See Also:
Action.addPropertyChangeListener(java.beans.PropertyChangeListener)

actionPerformed

public void actionPerformed(ActionEvent ae)
Description copied from interface: ActionListener
Invoked when an action occurs.

Specified by:
actionPerformed in interface ActionListener