stella.jview
Class DeviceSimulator.SimulationHandler
java.lang.Object
java.lang.Thread
stella.jview.DeviceSimulator.SimulationHandler
- All Implemented Interfaces:
- ActionListener, Runnable, EventListener
- Enclosing class:
- DeviceSimulator
protected class DeviceSimulator.SimulationHandler
- extends Thread
- implements ActionListener
A thread that takes over the handling of the incomming command in the
device simulator. First, the command received is displayed in the
status field. The initial acknowledge event is sent back according to
the values found in the appropriate fields. Any further acknowledge,
done, or error event is generated and sent back only at user input
(pressing of the appropriate button).
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
last
private CommandEvent last
acktype
private int acktype
cancel
private boolean cancel
DeviceSimulator.SimulationHandler
protected DeviceSimulator.SimulationHandler()
- Constructs a new simulator-handler thread. Registers itself as an
action listener at the acknowledge, done, and error button of
the simulator.
run
public void run()
- The run method. Loops forever.
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
cancel
public void cancel()
- Cancels this thread.
gotCommand
private void gotCommand(CommandEvent cmd)
- Call this method with a new command received. If the last command
has not been completed, a final successful done event is
generated and sent back to the listeners before processing the
new command.
actionPerformed
public void actionPerformed(ActionEvent ae)
- Receives button presses.
- Specified by:
actionPerformed in interface ActionListener