|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.kzoo.grid.display.RotatedDecorator
Grid Display Package:
A RotatedDecorator
will allow a display to change as the
object it is associated with changes direction. The GridObject
must have a Direction
direction in order for it to work.
Constructor Summary | |
RotatedDecorator(Direction d)
Construct a new RotatedDecorator that can be
added to a ScaledDisplay . |
Method Summary | |
static void |
adjustForDirection(GridObject obj,
java.awt.Graphics2D g2)
Adjusts the graphics system for drawing an object with direction. |
void |
decorate(ScaledDisplay sd,
GridObject obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Apply the rotating aspect of the decoration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RotatedDecorator(Direction d)
RotatedDecorator
that can be
added to a ScaledDisplay
.
d
- The origrinal direction the object is facingMethod Detail |
public void decorate(ScaledDisplay sd, GridObject obj, java.awt.Component comp, java.awt.Graphics2D g2)
decorate
in interface DisplayDecorator
public static void adjustForDirection(GridObject obj, java.awt.Graphics2D g2)
obj
has a direction
method.)
obj
- object we want to drawg2
- drawing surface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |