public class SimulationAnimation extends Simulation
Constructor and Description |
---|
SimulationAnimation(javax.swing.JFrame paramGui)
Constructor with a GUI
|
Modifier and Type | Method and Description |
---|---|
int |
getIteration()
Returns the number of iteration
|
int |
getNumIterations()
Returns the limit number of iterations
|
void |
run()
Runs after each time the timer runs out of time
|
void |
run(int paramNumIterations)
Runs the whole simulation with the number of iterations indicated
in the parameter in a animated simulation repainting the GUI.
|
void |
setMeasurementEvolution(MeasurementEvolution measurement)
Sets a reference to the measurement value given in the parameter
|
void |
setObserver(ObserverAnimation observer)
Sets the observer for notififying the end of the simulation
|
void |
setSpeed(double speed)
Set the speed (iterations/second) translating it to miliseconds of the
interval of each iteration.
|
public SimulationAnimation(javax.swing.JFrame paramGui)
public void run(int paramNumIterations)
run
in class Simulation
public void run()
public int getIteration()
getIteration
in class Simulation
public int getNumIterations()
public void setSpeed(double speed)
public void setMeasurementEvolution(MeasurementEvolution measurement)
measurement
- Object in which the records will be recorded.public void setObserver(ObserverAnimation observer)