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.AbstractAction
The abstract classNamedAction
is derived fromAbstractAction
and provides an additional instance variable calledname
. Thus it is possible to identify anAction
by 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 newNamedAction
instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs.java.lang.String
getName()
Returns thename
of theAction
object.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns thename
of theAction
object.- Returns:
- the value of the variable
name
-
actionPerformed
public abstract void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs. The methodactionPerformed
must be implemented by the user ofNamedAction
.- Parameters:
e
- anActionEvent
-
-