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