swarm.simtoolsgui
Interface ControlPanel

All Known Implementing Classes:
ControlPanelImpl

public abstract interface ControlPanel
extends SwarmObjectS, SwarmObject

Class to control the top level SwarmProcess. ControlPanel keeps track of the users requests to run, stop, quit, or time step the simulation. It cooperates with the GUISwarm to control the execution of activities in Swarm.


Method Summary
 Object getState()
          Get the current button state of the controlpanel.
 Object setState(Object s)
           
 Object setStateNextTime()
          Stop the running activity, and then set state to `ControlStateNextTime'.
 Object setStateQuit()
          Terminate activities, and set state to `ControlStateQuit'.
 Object setStateRunning()
          Sets the state to `running'.
 Object setStateSave()
          Saves the objects that are registered for archiving.
 Object setStateStepping()
          Stop the running activity, and then set state to `ControlStateStepping'.
 Object setStateStopped()
          The -setStateStopped message is particularly useful since it will cause the simulation to stop until the user interactively sets it back in motion (in other words, this method is useful in generating a software-triggered pause).
 Object startInActivity(Object activityID)
           
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 

Method Detail

getState

public Object getState()
Get the current button state of the controlpanel. Is one of ControlStateRunning, ControlStateStopped, ControlStateStepping, ControlStateNextTime, or ControlStateQuit.

setState

public Object setState(Object s)

startInActivity

public Object startInActivity(Object activityID)

setStateRunning

public Object setStateRunning()
Sets the state to `running'.

setStateStopped

public Object setStateStopped()
The -setStateStopped message is particularly useful since it will cause the simulation to stop until the user interactively sets it back in motion (in other words, this method is useful in generating a software-triggered pause).

setStateStepping

public Object setStateStepping()
Stop the running activity, and then set state to `ControlStateStepping'.

setStateQuit

public Object setStateQuit()
Terminate activities, and set state to `ControlStateQuit'.

setStateNextTime

public Object setStateNextTime()
Stop the running activity, and then set state to `ControlStateNextTime'.

setStateSave

public Object setStateSave()
Saves the objects that are registered for archiving.