edu.neu.ccs.gui
Class FocusAction
java.lang.Object
javax.swing.AbstractAction
edu.neu.ccs.gui.FocusAction
- All Implemented Interfaces:
- Action, ActionListener, Cloneable, EventListener, Serializable
- public abstract class FocusAction
- extends AbstractAction
Encapsulates an action that is performed
as a result of a FocusEvent.
- Since:
- 1.0.1
- Version:
- 2.2
- See Also:
- Serialized Form
|
Constructor Summary |
FocusAction()
Constructs a focus action with no name or icon. |
FocusAction(String name)
Constructs a focus action with the given name but no icon. |
FocusAction(String name,
Icon icon)
Constructs a focus action with the given name and icon. |
FocusAction
public FocusAction()
- Constructs a focus action with no name or icon.
FocusAction
public FocusAction(String name)
- Constructs a focus action with the given name but no icon.
- Parameters:
name - the name for this action
FocusAction
public FocusAction(String name,
Icon icon)
- Constructs a focus 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
focusActionPerformed method of this class
intended to perform tasks requiring information
contained in the FocusEvent triggering this action.
If the given event is not a
FocusActionEvent,
this action is not performed.
- Parameters:
evt - an object encapsulating an event
that triggered this action
focusActionPerformed
public abstract void focusActionPerformed(FocusEvent fevt)
- Performs the tasks encapsulated by this action.
Subclasses should override this method to provide
tasks this action performs.
- Parameters:
fevt - the focus event that triggered this action