Documentation Set for Swarm 2.0.1 | ||
---|---|---|
Prev | Appendix C. Probing and Displaying the Contents of a SwarmObject | Next |
The ProbeDisplay class is meant to serve a dual role, represented by this figure and the previous figure:
On the one hand if an object to be probed is specified without any particular ProbeMap being specified, then the ProbeDisplay generated will provide a window of class DefaultProbeDisplay, which displays all the variables resident in that class structure.
On the other hand, if a ProbeMap is specified then the ProbeDisplay follows exactly the specification as represented by the contents of the ProbeMap (above). When used in this manner, ProbeDisplays can generate tailored interfaces to objects (so for example, we have purposefully hidden certain instance variables in the HeatbugModelSwarm class, and have shown only one of the methods which the class understands).
Common to both the standard ProbeDisplay and the CompleteProbeDisplay:
The different fields in the ProbeDisplay can be updated by typing in new values and pressing Return. However, certain fields (containing pointers or ids, for example) cannot be modified and will generate a beep if such a modification is attempted.
If an instance variable/argument slot is defined to hold an object, then that object can be drag&dropped into another variable/argument slot by clicking on it with the first mouse button (a small rectangle with the name of the object will appear - simply drag it to another object-typed variable/argument slot and release the mouse button).
Also, if an instance variable/argument slot is defined to hold an object, then that object can be inspected by clicking the entry for that variable/argument slot with the third mouse button (a ProbeDisplay for that object will be generated).
Available only on the standard ProbeDisplay:
Note that the sunken label at the top of the ProbeDisplay is also active. By clicking on it with the first mouse button you get a drag&drop'able representation of self. By clicking on it with the third mouse button you get a CompleteProbeDisplay to self.
Available only on the ProbeDisplay:
The green "superclass" button can be used to display the succesive superclasses of the object being probed.
The red "hide" button can be used to hide classes which are irrelevant thus reducing clutter.
The hide button on the lowest class in the hierarchy has a special meaning since clicking on it dismisses the entire ProbeDisplay.
Interface definition from simtoolsgui library.