Class ShapeOnScreen

java.lang.Object
  extended byShapeOnScreen

public class ShapeOnScreen
extends Object

A ShapeOnScreen models a Shape to be painted at a given position on a Screen.

Version:
5
See Also:
Shape, Screen

Constructor Summary
ShapeOnScreen(Shape shape, int x, int y)
          Construct a ShapeOncreen.
 
Method Summary
 Shape getShape()
          What Shape does this ShapeOnScreen represent?
 int getX()
          The current x coordinate of this ShapeOnScreen.
 int getY()
          The current y coordinate of this ShapeOnScreen.
static void main(String[] args)
          Unit test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeOnScreen

public ShapeOnScreen(Shape shape,
                     int x,
                     int y)
Construct a ShapeOncreen.

Parameters:
shape - the Shape
x - its x coordinate
y - its y coordinate
Method Detail

getShape

public Shape getShape()
What Shape does this ShapeOnScreen represent?

Returns:
the Shape.

getX

public int getX()
The current x coordinate of this ShapeOnScreen.

Returns:
the x coordinate.

getY

public int getY()
The current y coordinate of this ShapeOnScreen.

Returns:
the y coordinate.

main

public static void main(String[] args)
Unit test.