swarm.space
Interface Object2dDisplay

All Known Implementing Classes:
Object2dDisplayImpl

public interface Object2dDisplay
extends SwarmObject, SwarmObjectS

Object2dDisplay displays 2d arrays of objects.. Object2dDisplay helps display 2d arrays of objects. Create a Object2dDisplay, give it a Raster widget to draw on, a Discrete2d, a message to call on each object, and (optionally) a collection of objects and it will dispatch the message to all objects with the Raster widget as an argument. In addition, Object2dDisplay can help you make probees.


Method Summary
 java.lang.Object display()
          Draw all objects in the array (or optionally, the collection) on the raster widget.
 java.lang.Object makeProbeAtX$Y(int x, int y)
          Make a probe for an object at a specific point.
 java.lang.Object setObjectCollection(java.lang.Object objects)
          Set a collection of objects to be displayed.
 
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
 
Methods inherited from interface swarm.defobj.GetName
getName
 

Method Detail

setObjectCollection

public java.lang.Object setObjectCollection(java.lang.Object objects)
Set a collection of objects to be displayed. If this is not given, then Object2dDisplay loops through the 2d grid sending draw messages to all objects it finds there. Giving an explicit collection of objects to draw is more efficient if your grid is sparsely populated.

display

public java.lang.Object display()
Draw all objects in the array (or optionally, the collection) on the raster widget. All that happens here is the display message is sent to each object - it is the object's responsibility to render itself.

makeProbeAtX$Y

public java.lang.Object makeProbeAtX$Y(int x,
                                       int y)
Make a probe for an object at a specific point.