Package ipsk.swing.action
Class NamedAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- ipsk.swing.action.NamedAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public abstract class NamedAction extends javax.swing.AbstractActionThe abstract classNamedActionis derived fromAbstractActionand provides an additional instance variable calledname. Thus it is possible to identify anActionby its name.- Version:
- $Revision: 1.1 $
- Author:
- Simone Leonardi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NamedAction(java.lang.String n)Creates a newNamedActioninstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidactionPerformed(java.awt.event.ActionEvent e)Invoked when an action occurs.java.lang.StringgetName()Returns thenameof theActionobject.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns thenameof theActionobject.- Returns:
- the value of the variable
name
-
actionPerformed
public abstract void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs. The methodactionPerformedmust be implemented by the user ofNamedAction.- Parameters:
e- anActionEvent
-
-