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