Generic Environment GUI Class Library

Class RotatedImageDisplay

java.lang.Object
  |
  +--ScaledDisplay
        |
        +--ScaledImageDisplay
              |
              +--RotatedImageDisplay
All Implemented Interfaces:
LocatableDisplay
Direct Known Subclasses:
RotatedTintedImageDisplay

public class RotatedImageDisplay
extends ScaledImageDisplay

Environment-Based Applications:
A RotatedImageDisplay displays an object in an environment. The orientation (direction) of the image depends on the orientation (direction) of the object in the environment.

Version:
1 December 2002

Constructor Summary
RotatedImageDisplay(java.lang.String imageFilename, Direction dir)
          Constructs an object that knows how to display a rotatable image.
 
Method Summary
 void adjust(Locatable obj, java.awt.Component comp, java.awt.Graphics2D g2)
          Adjusts the graphics system for drawing a rotated image.
 int adjustForDirection(Locatable obj, java.awt.Graphics2D g2)
          Adjusts the graphics system for drawing an object with direction.
 
Methods inherited from class ScaledImageDisplay
draw, tint
 
Methods inherited from class ScaledDisplay
draw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotatedImageDisplay

public RotatedImageDisplay(java.lang.String imageFilename,
                           Direction dir)
Constructs an object that knows how to display a rotatable image.
Parameters:
imageFilename - name of file containing image
dir - direction object in image is facing
Method Detail

adjust

public void adjust(Locatable obj,
                   java.awt.Component comp,
                   java.awt.Graphics2D g2)
Adjusts the graphics system for drawing a rotated image. (Precondition: obj has a direction method.)
Overrides:
adjust in class ScaledImageDisplay

adjustForDirection

public 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