|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IController
Defines methods for controlling the execution of a SimModel. Implementors will add code to work with loading and saving parameters and perhaps a GUI for controlling the execution.
| Method Summary | |
|---|---|
void |
addSimEventListener(SimEventListener listener)
Adds a listener for SimEvents fired by this IController. |
void |
exitSim()
Exits the entire simulation. |
double |
getCurrentTime()
Returns the current tick value. |
boolean |
getExitOnExit()
Gets whether the simulation application should exit with a System.exit(0) call on exit (pressing the exit button), or dispose of all windows, release the model without killing this instance of the virtual machine. |
SimModel |
getModel()
Returns the SimModel executed by this IController. |
java.lang.Object |
getPersistentObj(java.lang.Object key)
Gets a stored persistent (over the life of many runs) object. |
long |
getRunCount()
Gets the number of the run that this controller is running. |
Schedule |
getSchedule()
Returns the Schedule of execution for the SimModel for this IController. |
boolean |
isBatch()
Returns whether or not this Controller is a batch controller. |
boolean |
isGUI()
Returns whether or not this Controller is a GUI controller. |
void |
pauseSim()
Pauses a simulation run. |
void |
putPersistentObj(java.lang.Object key,
java.lang.Object val)
Allows for the storage of objects to persist beyond the life of a single run by objects that do not so persist. |
void |
removeSimEventListener(SimEventListener listener)
Removes the specified SimEventListener from this IController. |
void |
setExitOnExit(boolean val)
Sets whether the simulation application should exit with a System.exit(0) call on exit (pressing the exit button), or dispose of all windows, release the model without killing this instance of the virtual machine. |
void |
setModel(SimModel model)
Sets the SimModel to be executed by this IController. |
void |
setSchedule(Schedule schedule)
Sets he Schedule of execution for the SimModel for this IController. |
void |
startSim()
Starts a simulation run. |
void |
stopSim()
Stops a simulation run. |
| Method Detail |
|---|
void startSim()
double getCurrentTime()
getCurrentTime in interface TickCountervoid stopSim()
void pauseSim()
void exitSim()
SimModel getModel()
void setModel(SimModel model)
model - the SimModel to be executed by this IControllerSchedule getSchedule()
void setSchedule(Schedule schedule)
schedule - the Schedule of exectutionvoid addSimEventListener(SimEventListener listener)
listener - listens for SimEvents fired by this IControllervoid removeSimEventListener(SimEventListener listener)
listener - the SimEventListener to removeboolean isGUI()
boolean isBatch()
void putPersistentObj(java.lang.Object key,
java.lang.Object val)
key - a unique identifier for the object to storeval - the actual object to storejava.lang.Object getPersistentObj(java.lang.Object key)
key - the unique identifier for the persistent objectlong getRunCount()
void setExitOnExit(boolean val)
boolean getExitOnExit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||