Opus5
Class Rectangle

java.lang.Object
  |
  +--Opus5.GraphicalObject
        |
        +--Opus5.Rectangle
All Implemented Interfaces:
GraphicsPrimitives
Direct Known Subclasses:
Square

public class Rectangle
extends GraphicalObject

A rectangular graphical object.

Version:
$Id: Rectangle.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
GraphicalObject

Field Summary
protected  int height
          The height of the rectangle.
protected  int width
          The width of the rectangle.
 
Fields inherited from class Opus5.GraphicalObject
backgroundColor, center, foregroundColor
 
Fields inherited from interface Opus5.GraphicsPrimitives
copyright
 
Constructor Summary
Rectangle(Point p, int ht, int wid)
          Constructs a Rectangle with the specified center point, height and width.
 
Method Summary
 void draw()
          Draws this rectangle.
 
Methods inherited from class Opus5.GraphicalObject
erase, moveTo, setPenColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

protected int height
The height of the rectangle.

width

protected int width
The width of the rectangle.
Constructor Detail

Rectangle

public Rectangle(Point p,
                 int ht,
                 int wid)
Constructs a Rectangle with the specified center point, height and width.
Parameters:
p - The center point of this rectangle.
ht - The height of this rectangle.
wid - The width of this rectangle.
Method Detail

draw

public void draw()
Draws this rectangle. This method is not implemented.
Overrides:
draw in class GraphicalObject