swarm.space
Interface Value2dDisplay

All Known Implementing Classes:
Value2dDisplayImpl

public interface Value2dDisplay
extends SwarmObject, SwarmObjectS

Value2dDisplay displays 2d arrays of values.. Value2dDisplay helps display 2d arrays of values. Value2dDisplay goes through a given Discrete2d array, turn states into colours, and draws them into a Raster widget.


Method Summary
 java.lang.Object display()
          Draw the array on the given widget.
 java.lang.Object setDisplayMappingM$C(int m, int c)
          Linear transform of states to colours for drawing.
 
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

setDisplayMappingM$C

public java.lang.Object setDisplayMappingM$C(int m,
                                             int c)
Linear transform of states to colours for drawing. color = state / m + c If not set, assume m == 1 and c == 0.

display

public java.lang.Object display()
Draw the array on the given widget. Note that you still have to tell the widget to draw itself afterwards. The code for display uses the fast macro access in Discrete2d on the cached return value from getLattice. It also caches the drawPointX:Y: method lookup on the display widget - this is a nice trick that you might want to look at.