edu.kzoo.grid.display
Interface GridObjectDisplay

All Known Implementing Classes:
ScaledDisplay

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.

Version:
13 December 2003
Author:
Alyce Brady
See Also:
DisplayMap

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

draw

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.

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