Generic Environment GUI Class Library

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

Constructor Summary
RotatedDisplay()
           
 
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 ScaledDisplay
draw, draw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotatedDisplay

public RotatedDisplay()
Method Detail

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 draw
g2 - drawing surface

Generic Environment GUI Class Library

Copyright© 2003 Alyce Brady