Class RectangleShape

java.lang.Object
  extended byShape
      extended byRectangleShape

public class RectangleShape
extends Shape

Rectangle shape for the Drawing program

Version:
20050606
Author:
Peter Gadfort

Field Summary
 
Fields inherited from class Shape
 
Constructor Summary
RectangleShape(int x, int y, int height, int width, Color color)
          Constructor for objects of class Rectangle
 
Method Summary
 void draw(Graphics g)
          Draws the shape on the input screen
 
Methods inherited from class Shape
getColor, getHeight, getWidth, getX, getY, setColor, setHeight, setWidth, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectangleShape

public RectangleShape(int x,
                      int y,
                      int height,
                      int width,
                      Color color)
Constructor for objects of class Rectangle

Parameters:
x - X position of the rectangle
y - Y position of the rectangle
height - Height of the rectangle
width - Width of the rectangle
color - Color of the rectangle
Method Detail

draw

public void draw(Graphics g)
Draws the shape on the input screen

Specified by:
draw in class Shape
Parameters:
g - Graphics screen used to draw the shaep on