iceCube.uhe.event
Class JulietTask

java.lang.Object
  extended by iceCube.uhe.event.JulietTask

public class JulietTask
extends java.lang.Object

Uses a SwingWorker to perform time-consuming tasks in JulietEventGenerator such as generating the Interaction Matrix and running the propagating particle. These tasks are performed in a thred for the SWING-based GUI application. It also generates the message to indicate the progress of the invoked task for the ProgressBar in the SWING. This is a sort of "interface" class between SWING and JULIeT.


Field Summary
 JulietEventGenerator generator
          JULIeTGenerator.
 
Constructor Summary
JulietTask(SwingRun swingRun)
           
 
Method Summary
 void generate()
          start the task to generate a particle.
 int getCurrent()
          Called from ProgressBarDemo to find out how much has been done.
 int getLengthOfTask()
          find out how much work needs to be done.
 java.lang.String getMessage()
          Returns the most recent status message, or null if there is no current status message.
 boolean isDone()
          Called from ProgressBarDemo to find out if the task has completed.
 boolean isPropagationDone()
          Tell outside objects whether runEvent is done or not.
 void propagate()
          start the task to run a particle.
 void setPropagationFlagToFalse()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generator

public JulietEventGenerator generator
JULIeTGenerator. Generate particles and let them run

Constructor Detail

JulietTask

public JulietTask(SwingRun swingRun)
Method Detail

generate

public void generate()
start the task to generate a particle.


propagate

public void propagate()
start the task to run a particle.


getLengthOfTask

public int getLengthOfTask()
find out how much work needs to be done.


getCurrent

public int getCurrent()
Called from ProgressBarDemo to find out how much has been done.


stop

public void stop()

isDone

public boolean isDone()
Called from ProgressBarDemo to find out if the task has completed.


isPropagationDone

public boolean isPropagationDone()
Tell outside objects whether runEvent is done or not.


setPropagationFlagToFalse

public void setPropagationFlagToFalse()

getMessage

public java.lang.String getMessage()
Returns the most recent status message, or null if there is no current status message.