RePast
v. 2.0

uchicago.src.sim.util
Class ProbeUtilities

java.lang.Object
  |
  +--uchicago.src.sim.util.ProbeUtilities

public class ProbeUtilities
extends Object

Static utility methods for creating and working with Probes.


Constructor Summary
ProbeUtilities()
           
 
Method Summary
static void addModelProbePanel(IntrospectPanel panel)
          Adds the IntrospectPanel for a simulation model.
static void addProbeListener(ProbeListener probeListener)
          Adds the specified ProbeListener to receive ProbeEvents from any probed objects.
static void addProbePanel(Object o, IntrospectPanel panel)
          Adds and associates the specified IntrospectPanel with the specified object.
static void clearProbePanels()
          Clears the map of Objects and their probe panels.
static List getProbedObjects()
          Returns a list of the objects being probed.
static void probe(Object o)
          Probes an object, where probing means to display an Object's properties via get and set methods.
static void removeModelProbePanel()
          Removes the IntrospectPanel associated with the simulation model.
static void removeProbePanel(Object o)
          Removes the IntrospectPanel associated with the specified Object.
static void updateModelProbePanel()
          Updates the IntrospectPanel for the simulation model.
static void updateProbePanel(Object o)
          Updates the IntrospectPanel (the Probe window) for the specified object.
static void updateProbePanels()
          The probe panels for any objects that are currently being probed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbeUtilities

public ProbeUtilities()
Method Detail

probe

public static void probe(Object o)
Probes an object, where probing means to display an Object's properties via get and set methods. The property name and value will be displayed in a window. The values can be edited when appropriate.

Parameters:
o - the Object to be probed.

getProbedObjects

public static List getProbedObjects()
Returns a list of the objects being probed.


addModelProbePanel

public static void addModelProbePanel(IntrospectPanel panel)
Adds the IntrospectPanel for a simulation model. This should not be called by modelers

Parameters:
panel - the panel displaying the model's properties

removeModelProbePanel

public static void removeModelProbePanel()
Removes the IntrospectPanel associated with the simulation model.


updateModelProbePanel

public static void updateModelProbePanel()
Updates the IntrospectPanel for the simulation model.


addProbePanel

public static void addProbePanel(Object o,
                                 IntrospectPanel panel)
Adds and associates the specified IntrospectPanel with the specified object. An IntrospectPanel is what a probed agent's properties are displayed in. This should not be called by modelers

Parameters:
o - the probed object
panel - the panel displaying the object's properties

removeProbePanel

public static void removeProbePanel(Object o)
Removes the IntrospectPanel associated with the specified Object.

Parameters:
o - the probed object whose panel should be removed

clearProbePanels

public static void clearProbePanels()
Clears the map of Objects and their probe panels.


updateProbePanel

public static void updateProbePanel(Object o)
Updates the IntrospectPanel (the Probe window) for the specified object. Use this method to update the probe display for an agent or model. The agent or model should be the object passed to the method.

Parameters:
o - the object whose probe panel is to be updated

updateProbePanels

public static void updateProbePanels()
The probe panels for any objects that are currently being probed. Note that this does not update a simulation Model's probePanel. To update your model's probe panel, use updateModelProbePanel.


addProbeListener

public static void addProbeListener(ProbeListener probeListener)
Adds the specified ProbeListener to receive ProbeEvents from any probed objects.

Parameters:
probeListener - the ProbeListener

RePast
v. 2.0

Bug reports and feature requests to RePast