Interface GridObjectDisplay

All Known Implementing Classes:

public interface GridObjectDisplay

Grid Display Package:
The GridObjectDisplay interface contains the method needed to display an object in a grid. Objects that implement the GridObjectDisplay interface are called on by the GridDisplay to draw grid objects. The association between a particular GridObject subclass and its display is handled in the DisplayMap class.

The GridObjectDisplay class is based on the College Board's LocatableDisplay class, as allowed by the GNU General Public License.

13 December 2003
Alyce Brady
See Also:

Method Summary
 void draw(GridObject obj, java.awt.Component c, java.awt.Graphics2D g2, java.awt.Rectangle rect)
          Method invoked to draw a GridObject.

Method Detail


public void draw(GridObject obj,
                 java.awt.Component c,
                 java.awt.Graphics2D g2,
                 java.awt.Rectangle rect)
Method invoked to draw a GridObject. The first argument is the grid object to draw, the second the component, the third the drawing surface, the last is the rectangle in which to draw. A class that implements this interface should draw a representation of the given GridObject object on the drawing surface in the given rectangle.

obj - object we want to draw
g2 - drawing surface
rect - rectangle in which to draw