uchicago.src.sim.util
Class ProbeUtilities

java.lang.Object
  extended by uchicago.src.sim.util.ProbeUtilities

public class ProbeUtilities
extends java.lang.Object

Static utility methods for creating and working with Probes.

Version:
$Revision: 1.8 $ $Date: 2005/08/01 20:36:18 $

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(java.lang.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 void closeAllProbeWindows()
           
static void closeProbeWindows(java.util.Collection c)
          Closes all the probing windows for the objects in the collection.
static IntrospectFrame getObjectsFrame(java.lang.Object o)
          retrieves the IntrospectFrame that an object is being probed under
static java.util.List getProbedObjects()
          Returns a list of the objects being probed.
static void probe(java.lang.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(java.lang.Object o)
          Removes the IntrospectPanel associated with the specified Object.
static void updateModelProbePanel()
          Updates the IntrospectPanel for the simulation model.
static void updateProbePanel(java.lang.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(java.lang.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 java.util.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(java.lang.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(java.lang.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(java.lang.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

closeAllProbeWindows

public static void closeAllProbeWindows()

closeProbeWindows

public static void closeProbeWindows(java.util.Collection c)
Closes all the probing windows for the objects in the collection. If an object is in the collection and isn't being probed it is ignored.

Parameters:
c - the collection containing objects that may be being probed

getObjectsFrame

public static IntrospectFrame getObjectsFrame(java.lang.Object o)
retrieves the IntrospectFrame that an object is being probed under

Parameters:
o - the object being probed
Returns:
the frame holding the IntrospectPanel