|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.apps.util.SwingWorker
byucc.jhdl.apps.util.SimulatorThread
This abstract class is subclassed by StimulatorThread and ClockThread. This class manages the queue of SimulatorThreads to ensure that they are executed in the order they were created. NOTE that it is the order of creation, not necessarily the order of invoking the start() method that matters. Therefore, to set the order of SimulatorThread execution, make sure you carefully control the order of SimulatorThread creation.
Subclasses of this class must still implement the public Object construct() method. This method should implement the actual processing core of the the thread.
StimulatorThread
,
ClockThread
Constructor Summary | |
SimulatorThread()
This constructor will enqueue this thread in the SimulatorThread queue. |
Method Summary | |
void |
addReturnedListener(SimulatorThreadListener listener)
Registers a SimulatorThreadListener with this thread. |
void |
finished()
This just makes sure that the next thread is started if the queue is still not empty. |
void |
start()
Overrides the start method of the SwingWorker class to make sure that this thread is really only started if it is at the head of the SimulatorThread queue. |
Methods inherited from class byucc.jhdl.apps.util.SwingWorker |
construct, get, getValue, interrupt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimulatorThread()
Method Detail |
public void addReturnedListener(SimulatorThreadListener listener)
listener
- the new listener to registerpublic void start()
start
in class SwingWorker
public void finished()
finished
in class SwingWorker
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |