swarm.space
Interface GridData

All Known Subinterfaces:
Ca2d, ConwayLife2d, DblBuffer2d, Diffuse2d, Discrete2d, Grid2d
All Known Implementing Classes:
Discrete2dImpl

public interface GridData

Methods used by Value2dDisplay and Object2dDisplay for display. Methods required by widgets that display grids. User defined space objects must adopt this or any implementor of it in order to be accepted as data providers in the setDiscrete2dToDisplay method of Value2dDisplay and Object2dDisplay objects. User spaces must also define the macro discrete2dSiteAt(), versions of which can be found in Grid2d.h or Discrete2d.h.


Method Summary
 java.lang.Object getObjectAtX$Y(int x, int y)
          Return the pointer stored at (x,y).
 int getSizeX()
          Get the size of the lattice in the X dimension.
 int getSizeY()
          Get the size of the lattice in the Y dimension.
 int getValueAtX$Y(int x, int y)
          Return the integer stored at (x,y).
 

Method Detail

getSizeX

public int getSizeX()
Get the size of the lattice in the X dimension.

getSizeY

public int getSizeY()
Get the size of the lattice in the Y dimension.

getObjectAtX$Y

public java.lang.Object getObjectAtX$Y(int x,
                                       int y)
Return the pointer stored at (x,y).

getValueAtX$Y

public int getValueAtX$Y(int x,
                         int y)
Return the integer stored at (x,y).