JAPI 0.9.0
Yet another Java API
API Documentation

net.sf.japi.swing
Class DummyAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.sf.japi.swing.DummyAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public final class DummyAction
extends AbstractAction

Dummy Action implementation, an Action implementation which does nothing and only serves as an Action Property container. This is useful e.g. for JMenu, instances of which you can create using Action instances but where implementing the basic abstract method ActionListener#actionPerformed(ActionEvent) does not make any sense. This class is also an appropriate superclass for Action implementations that aren't interested in ActionEvents but other events.

Author:
Christian Hujer
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
DummyAction()
          Create a Dummy Action.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Invoked when an action occurs. The implementation of this method in DummyAction simply does nothing.
protected  Object clone()
          Clones the abstract action.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, 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

DummyAction

public DummyAction()
Create a Dummy Action.

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Invoked when an action occurs. The implementation of this method in DummyAction simply does nothing.


clone

protected Object clone()
                throws CloneNotSupportedException
Clones the abstract action. This gives the clone its own copy of the key/value list, which is not handled for you by Object.clone().

Overrides:
clone in class AbstractAction
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
See Also:
Cloneable

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright