public interface GridObjectDisplay
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.
DisplayMap
Modifier and Type | Method and Description |
---|---|
void |
draw(GridObject obj,
java.awt.Component c,
java.awt.Graphics2D g2,
java.awt.Rectangle rect)
Method invoked to draw a GridObject.
|
void draw(GridObject obj, java.awt.Component c, java.awt.Graphics2D g2, java.awt.Rectangle rect)
obj
- object we want to drawg2
- drawing surfacerect
- rectangle in which to draw