Class CircleShape

java.lang.Object
  extended byShape
      extended byCircleShape

public class CircleShape
extends Shape

Circle shape for the Drawing program

Version:
20050606
Author:
Peter Gadfort

Field Summary
private  int radius
          Radius of the circle
 
Fields inherited from class Shape
 
Constructor Summary
CircleShape(int x, int y, int radius, Color color)
          Constructor for objects of class Circle
 
Method Summary
 void draw(Graphics g)
          Draws the shape on the input screen
 int getRadius()
          Returns the radius of the circle
 void setRadius(int radius)
          Sets the radius of the circle
 
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
 

Field Detail

radius

private int radius
Radius of the circle

Constructor Detail

CircleShape

public CircleShape(int x,
                   int y,
                   int radius,
                   Color color)
Constructor for objects of class Circle

Parameters:
x - X position of the circle
y - Y position of the circle
radius - Radius of the circle
color - Color of the circle
Method Detail

getRadius

public int getRadius()
Returns the radius of the circle

Returns:
Radius of the circle

setRadius

public void setRadius(int radius)
Sets the radius of the circle

Parameters:
radius - Radius of the circle

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