Package repast.simphony.ui
Class GUIScheduleRunner
- java.lang.Object
-
- repast.simphony.engine.environment.AbstractRunner
-
- repast.simphony.ui.GUIScheduleRunner
-
public class GUIScheduleRunner extends AbstractRunner
This class executes the model schedule found in the RunState's ScheduleRegistry.- Author:
- Nick Collier
-
-
Field Summary
Fields Modifier and Type Field Description long
lastSleepTime
-
Fields inherited from class repast.simphony.engine.environment.AbstractRunner
controller, environmentBuilder, pause, runListeners, stop, thread
-
-
Constructor Summary
Constructors Constructor Description GUIScheduleRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRenderer(Renderer renderer)
void
clearRenderers()
void
execute(RunState toExecuteOn)
This executes the given RunState object's schedule.protected ISchedule
getSchedule(RunState toExecuteOn)
TickListener
getTickListener()
boolean
go()
Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).void
setPause(boolean pause)
void
setTickListener(TickListener tickListener)
void
step()
void
stop()
Stops the execution of the scheduled events after the any events scheduled for the current tick have been executed.-
Methods inherited from class repast.simphony.engine.environment.AbstractRunner
addRunListener, firePausedMessage, fireRestartedMessage, fireStartedMessage, fireStoppedMessage, init, removeRunListener, setController, setEnvironmentBuilder
-
-
-
-
Method Detail
-
addRenderer
public void addRenderer(Renderer renderer)
-
clearRenderers
public void clearRenderers()
-
execute
public void execute(RunState toExecuteOn)
This executes the given RunState object's schedule. It will continue executing the schedule until there are no more actions schedule or the run manager tells it to stop.- Parameters:
toExecuteOn
- the RunState to execute on
-
go
public boolean go()
Description copied from interface:Runner
Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).- Specified by:
go
in interfaceRunner
- Overrides:
go
in classAbstractRunner
- Returns:
- true if the runner should keep going
-
setPause
public void setPause(boolean pause)
- Specified by:
setPause
in interfaceRunner
- Overrides:
setPause
in classAbstractRunner
-
step
public void step()
- Specified by:
step
in interfaceRunner
- Overrides:
step
in classAbstractRunner
-
stop
public void stop()
Description copied from class:AbstractRunner
Stops the execution of the scheduled events after the any events scheduled for the current tick have been executed.- Specified by:
stop
in interfaceRunner
- Overrides:
stop
in classAbstractRunner
-
getTickListener
public TickListener getTickListener()
-
setTickListener
public void setTickListener(TickListener tickListener)
-
-