edu.neu.ccs.gui
Class ThreadedAction

java.lang.Object
  extended byedu.neu.ccs.gui.ActionWrapper
      extended byedu.neu.ccs.gui.ThreadedAction
All Implemented Interfaces:
Action, ActionListener, EventListener

public class ThreadedAction
extends ActionWrapper

An ActionWrapper that performs its encapsulated action in a newly created separate thread.

Since:
2.0
Version:
2.2

Field Summary
 
Fields inherited from class edu.neu.ccs.gui.ActionWrapper
action
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ThreadedAction()
          Constructs an empty wrapper .
ThreadedAction(Action action)
          Constructs a wrapper that encapsulates the given action.
 
Method Summary
 void actionPerformed(ActionEvent event)
          Invokes the actionPerformed method of the encapsulated action in a newly created separate thread that is executed as a daemon thread.
 
Methods inherited from class edu.neu.ccs.gui.ActionWrapper
addPropertyChangeListener, getAction, getBaseAction, getName, getValue, isEnabled, putValue, removePropertyChangeListener, setAction, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedAction

public ThreadedAction()
Constructs an empty wrapper .


ThreadedAction

public ThreadedAction(Action action)
Constructs a wrapper that encapsulates the given action.

Parameters:
action - the action to encapsulate and perform in a separate thread
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Invokes the actionPerformed method of the encapsulated action in a newly created separate thread that is executed as a daemon thread.

Specified by:
actionPerformed in interface ActionListener
Specified by:
actionPerformed in class ActionWrapper
Parameters:
event - the event that invoked this action