swarm.space
Interface Value2dDisplay
- All Known Implementing Classes:
- Value2dDisplayImpl
- public abstract interface Value2dDisplay
- extends SwarmObjectS, SwarmObject
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.
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 |
setDisplayMappingM$C
public 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 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.