Class ESFrameObserverSwarm

java.lang.Object
  extended byswarm.BaseImpl
      extended byswarm.simtoolsgui.GUISwarmImpl
          extended byESFrameObserverSwarm
All Implemented Interfaces:
swarm.activity.ActionType, swarm.activity.ActionTypeS, swarm.defobj.Create, swarm.defobj.CreateS, swarm.defobj.Customize, swarm.defobj.CustomizeS, swarm.defobj.DefinedObject, swarm.defobj.DefinedObjectS, swarm.defobj.Drop, swarm.defobj.DropS, swarm.defobj.GetName, swarm.defobj.GetNameS, swarm.simtoolsgui.GUISwarm, swarm.simtoolsgui.GUISwarmS, swarm.objectbase.Swarm, swarm.activity.SwarmProcess, swarm.activity.SwarmProcessS, swarm.objectbase.SwarmS, swarm.activity.SynchronizationType, swarm.activity.SynchronizationTypeS, swarm.simtoolsgui.WindowGeometryRecordName, swarm.simtoolsgui.WindowGeometryRecordNameS, swarm.defobj.Zone, swarm.defobj.ZoneS

public class ESFrameObserverSwarm
extends swarm.simtoolsgui.GUISwarmImpl

The Observer contains the Model and the graphic widgets

Author:
Pietro Terna and several of his students

Field Summary
 swarm.activity.ActionGroup displayActions1
          two ActionGroup for sequence of GUI events
 swarm.activity.ActionGroup displayActions2
          two ActionGroup for sequence of GUI events
 int displayFrequency
          update frequency
 swarm.activity.Schedule displaySchedule
          the single Schedule instance
 ESFrameModelSwarm eSFrameModelSwarm
          the Swarm we are observing
 int timeToFinish
          the time at which we stop the simulation (if !
 swarm.analysis.EZGraphImpl totalTimeLengthGraph
          our graphics or EZGraph output to files
 boolean verboseChoice
          displaying all messages on the console
 
Fields inherited from class swarm.simtoolsgui.GUISwarmImpl
actionCache, controlPanel
 
Constructor Summary
ESFrameObserverSwarm(swarm.defobj.Zone aZone)
          Constructor for class
 
Method Summary
 swarm.activity.Activity activateIn(swarm.objectbase.Swarm swarmContext)
          activateIn: - activate the schedules so they're ready to run.
 java.lang.Object buildActions()
          Create the actions necessary for the simulation.
 java.lang.Object buildObjects()
          Create the objects used to display the model.
 void drop()
          drop the Observer, but after having dropped the EZGraph
 void finish()
          to finish automatically, if timeToFinish!
 
Methods inherited from class swarm.simtoolsgui.GUISwarmImpl
allocIVars, allocIVarsComponent, compare, copyIVars, copyIVarsComponent, describe, describeForEach, describeForEachID, describeID, freeIVars, freeIVarsComponent, getActionCache, getActivity, getCompleteProbeMap, getComponentZone, getControlPanel, getDisplayName, getInternalZone, getName, getPageSize, getPopulation, getProbeForVariable, getProbeMap, getSynchronizationType, getTypeName, getZone, go, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayFrequency

public int displayFrequency
update frequency


timeToFinish

public int timeToFinish
the time at which we stop the simulation (if != 0)


verboseChoice

public boolean verboseChoice
displaying all messages on the console


displayActions1

public swarm.activity.ActionGroup displayActions1
two ActionGroup for sequence of GUI events


displayActions2

public swarm.activity.ActionGroup displayActions2
two ActionGroup for sequence of GUI events


displaySchedule

public swarm.activity.Schedule displaySchedule
the single Schedule instance


eSFrameModelSwarm

public ESFrameModelSwarm eSFrameModelSwarm
the Swarm we are observing


totalTimeLengthGraph

public swarm.analysis.EZGraphImpl totalTimeLengthGraph
our graphics or EZGraph output to files

Constructor Detail

ESFrameObserverSwarm

public ESFrameObserverSwarm(swarm.defobj.Zone aZone)
Constructor for class

Method Detail

buildObjects

public java.lang.Object buildObjects()
Create the objects used to display the model.


buildActions

public java.lang.Object buildActions()
Create the actions necessary for the simulation. This is where the schedule is built (but not run!) Here we create a display schedule - this is used to display the state of the world and check for user input.


activateIn

public swarm.activity.Activity activateIn(swarm.objectbase.Swarm swarmContext)
activateIn: - activate the schedules so they're ready to run. The swarmContext argument has to do with what we were activated in*. Typically the ObserverSwarm is the top-level Swarm, so it's activated in "null". But other Swarms and Schedules and such will be activated inside of us.


drop

public void drop()
drop the Observer, but after having dropped the EZGraph


finish

public void finish()
to finish automatically, if timeToFinish!=0