uchicago.src.sim.gui
Interface Probeable

All Known Implementing Classes:
HexaDisplay2D, InfiniteSpaceDisplay, MultiObject2DDisplay, Network2DDisplay, Network2DGridDisplay, Object2DDisplay, Object2DHexaDisplay, TextDisplay, Value2DDisplay, Value2DHexaDisplay, VectorDisplay

public interface Probeable

Interface for Displays that can be probed. When a display is probed it typicaly queries the space it is displaying for the objects at the probed coordinates, and then displays the accessible (through get and set methods) parameters of those objects.

Version:
$Revision: 1.3 $ $Date: 2004/11/03 19:50:59 $
Author:
Nick Collier

Method Summary
 java.util.ArrayList getObjectsAt(int x, int y)
          Gets the objects at the coordinate x, y.
 void setMoveableXY(Moveable moveable, int x, int y)
          Sets the new coordinates for specified moveable.
 

Method Detail

getObjectsAt

java.util.ArrayList getObjectsAt(int x,
                                 int y)
Gets the objects at the coordinate x, y. X and Y are screen coordinates.

Parameters:
x - the x screen coordinate.
y - the y screen coordinate.
Returns:
the object at the x, y coordinate.

setMoveableXY

void setMoveableXY(Moveable moveable,
                   int x,
                   int y)
Sets the new coordinates for specified moveable. This goes through probeable as some translation between screen pixel coordinates and the simulation coordinates may be necessary.

Parameters:
moveable - the moveable whose coordinates are changed
x - the x coordinate in pixels
y - the y coordinate in pixels