edu.neu.ccs.gui
Class WindowAction
java.lang.Object
javax.swing.AbstractAction
edu.neu.ccs.gui.WindowAction
- All Implemented Interfaces:
- Action, ActionListener, Cloneable, EventListener, Serializable
- public abstract class WindowAction
- extends AbstractAction
Encapsulates an action that is performed
as a result of a WindowEvent.
- Since:
- 1.0.1
- Version:
- 2.2
- See Also:
- Serialized Form
|
Constructor Summary |
WindowAction()
Constructs a window action with no name or icon. |
WindowAction(String name)
Constructs a window action with the given name but no icon. |
WindowAction(String name,
Icon icon)
Constructs a window action with the given name and icon. |
WindowAction
public WindowAction()
- Constructs a window action with no name or icon.
WindowAction
public WindowAction(String name)
- Constructs a window action with the given name but no icon.
- Parameters:
name - the name for this action
WindowAction
public WindowAction(String name,
Icon icon)
- Constructs a window action with the given name and icon.
- Parameters:
name - the name for this actionicon - the icon for this action
actionPerformed
public final void actionPerformed(ActionEvent evt)
- Performs this action by calling the
windowActionPerformed method of this class
intended to perform tasks requiring information
contained in the WindowEvent
triggering this action.
If the given event is not a
WindowActionEvent,
this action is not performed.
- Parameters:
evt - an object encapsulating an event
that triggered this action
windowActionPerformed
public abstract void windowActionPerformed(WindowEvent wevt)
- Performs the tasks encapsulated by this action.
Subclasses should override this method to provide
tasks this action performs.
- Parameters:
wevt - the window event that triggered this action