|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--haifa.shopsim.UI.ShopTraceMaker
This class is a thread that constntly waits for ShopChangedEvents and converts them to proper events for the Gantt Chart. It is basically an interaface between Fred Howells SimJava events that pass betweeen entites and this projects ShopChangedEvents.
Field Summary | |
private boolean |
gotDisplayCommand
Used for wait and notify when waiting for display commands |
private boolean |
gotShopEvent
Used for wait and notify when waiting on new traces |
private int |
numDisplayTraces
The number of display traces. |
private int |
numForwardedTraces
The number of forwardedTraces. |
private boolean |
running
True as long as thread is running. |
protected ShopChangeEvent |
shopChangeEvent
The shopChange event that is currently being handled. |
protected ShopData |
shopData
A refrence to the Shop Data Object. |
private java.util.Vector |
traceListeners
A vector of the listeners to this trace. |
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Fields inherited from interface eduni.simdiag.Traceable |
DISPLAY, LAYOUT, PAUSE, RUN, STOP, TRACE |
Constructor Summary | |
ShopTraceMaker(ShopData shopData_)
Creates new ShopTraceMaker |
Method Summary | |
void |
addTraceListener(TraceListener l)
Javabeans trace event output |
void |
forwardTrace(TraceEventObject e)
Sends trace event onwards to any listeners |
void |
kill()
Stops the ShopTraceMaker, should be called. |
void |
removeTraceListener(TraceListener l)
Javabeans trace event output |
void |
run()
|
void |
sendDisplayTrace()
Causes the ShopTraceMaker to send a dispaly trace, this method blocks untill the display trace was sent. |
void |
shopChanged(ShopChangeEvent sce)
Handle incoming shopchangeevents. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected ShopData shopData
protected ShopChangeEvent shopChangeEvent
private boolean gotShopEvent
private boolean gotDisplayCommand
private boolean running
private java.util.Vector traceListeners
private int numForwardedTraces
private int numDisplayTraces
Constructor Detail |
public ShopTraceMaker(ShopData shopData_)
Method Detail |
public void kill()
public void run()
run
in class java.lang.Thread
public void shopChanged(ShopChangeEvent sce)
shopChanged
in interface ShopChangeListener
public void sendDisplayTrace()
public void addTraceListener(TraceListener l)
public void removeTraceListener(TraceListener l)
public void forwardTrace(TraceEventObject e)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |