Interface LocatableDisplay
- All Known Implementing Classes:
- ScaledDisplay
- public interface LocatableDisplay
AP® Computer Science Marine Biology Simulation:
The LocatableDisplay
interface contains the
method needed to display an environment object.
Objects that implement the LocatableDisplay
interface are called
on by the EnvDisplay
to draw environment objects. The association between a
particular Locatable
subclass and its display is handled
in the DisplayMap
class.
The LocatableDisplay
class is
copyright© 2002 College Entrance Examination Board
(www.collegeboard.com).
- Version:
- 1 August 2002
- See Also:
Environment
,
DisplayMap
Method Summary |
void |
draw(Locatable obj,
java.awt.Component c,
java.awt.Graphics2D g2,
java.awt.Rectangle rect)
Method invoked to draw a Locatable. |
draw
public void draw(Locatable obj,
java.awt.Component c,
java.awt.Graphics2D g2,
java.awt.Rectangle rect)
- Method invoked to draw a Locatable. The first argument is the
locatable 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 Locatable object on the drawing surface in the given rectangle.
- Parameters:
obj
- object we want to drawcomp
- component on which to drawg2
- drawing surfacerect
- rectangle in which to draw
Copyright© 2002 College Entrance Examination Board