org.archiviststoolkit.swing
Class ConcreteAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.archiviststoolkit.swing.ConcreteAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class ConcreteAction
extends javax.swing.AbstractAction

The Concrete action is used to manage delegate actions.

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
ConcreteAction(java.lang.String name)
          Class constructor adds default values into the Action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
          delegates the actions back out to the specific component.
 void addActionListener(java.awt.event.ActionListener listener)
          Add an listener to this action.
 void removeActionListener(java.awt.event.ActionListener listener)
          Remove the listener.
 void setDescription(java.lang.String name)
          sets the description on the action.
 void setIcon(javax.swing.ImageIcon icon)
          sets the icon for the action.
 
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

ConcreteAction

public ConcreteAction(java.lang.String name)
Class constructor adds default values into the Action.

Parameters:
name - the name of the action
Method Detail

setIcon

public final void setIcon(javax.swing.ImageIcon icon)
sets the icon for the action.

Parameters:
icon - the icon to set

setDescription

public final void setDescription(java.lang.String name)
sets the description on the action.

Parameters:
name - the text to assign to the description

addActionListener

public final void addActionListener(java.awt.event.ActionListener listener)
Add an listener to this action.

Parameters:
listener - to be added

removeActionListener

public final void removeActionListener(java.awt.event.ActionListener listener)
Remove the listener.

Parameters:
listener - to be removed

actionPerformed

public final void actionPerformed(java.awt.event.ActionEvent actionEvent)
delegates the actions back out to the specific component.

Parameters:
actionEvent - the event that needs to be handled