Class RotatedDisplay
java.lang.Object
|
+--ScaledDisplay
|
+--RotatedDisplay
- All Implemented Interfaces:
- LocatableDisplay
- public abstract class RotatedDisplay
- extends ScaledDisplay
Environment-Based Applications:
This abstract class provides common implementation code for
drawing a Locatable object. The class will translate, scale, and
rotate the graphics system as needed and then invoke its
abstract draw
method. Subclasses of this abstract class
define draw
to just display an object with a fixed size.
- Version:
- 1 October 2002
Method Summary |
void |
adjust(Locatable obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Adjusts the graphics system for drawing a rotated object. |
static int |
adjustForDirection(Locatable obj,
java.awt.Graphics2D g2)
Adjusts the graphics system for drawing an object with direction. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RotatedDisplay
public RotatedDisplay()
adjust
public void adjust(Locatable obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
- Adjusts the graphics system for drawing a rotated object.
(Precondition:
obj
has a direction
method.)
- Overrides:
adjust
in class ScaledDisplay
adjustForDirection
public static int adjustForDirection(Locatable obj,
java.awt.Graphics2D g2)
- Adjusts the graphics system for drawing an object with direction.
(Precondition:
obj
has a direction
method.)
- Parameters:
obj
- object we want to drawg2
- drawing surface
Copyright© 2003 Alyce Brady