|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectm865.shapepack.Shape
m865.shapepack.Ellipse
MyCircle
A Circle subclass of Ellipse.
Field Summary |
Fields inherited from class m865.shapepack.Shape |
color, defaultColor, defaultHeight, defaultWidth, height, width, x, y |
Constructor Summary | |
MyCircle(int x,
int y)
Constructor for a circle at the specified location with the default color and the default height as the diameter. |
|
MyCircle(int x,
int y,
int d,
java.awt.Color c)
The generic constructor for a circle. |
Method Summary | |
void |
setHeight(int d)
Set the height of the circle. |
void |
setWidth(int d)
Set the width of the circle. |
java.lang.String |
toString()
Generates a string describing the parameters of the shape. |
Methods inherited from class m865.shapepack.Ellipse |
area, draw, perimeter |
Methods inherited from class m865.shapepack.Shape |
getColor, getHeight, getWidth, getX, getY, moveTo, setColor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MyCircle(int x, int y, int d, java.awt.Color c)
x
- horizontal coordinate of the upper left corner of the bounding box.y
- vertical coordinate of the upper left corner of the bounding box.d
- diameter of the circle (width and height of the bounding box).c
- fill color for the circle.public MyCircle(int x, int y)
x
- horizontal coordinate of the upper left corner of the bounding box.y
- vertical coordinate of the upper left corner of the bounding box.Method Detail |
public void setWidth(int d)
setWidth
in class Shape
d
- the new diameter of the circle (and width and height of the bounding box).public void setHeight(int d)
setHeight
in class Shape
d
- the new diameter of the circle (and width and height of the bounding box).public java.lang.String toString()
Shape
toString
in class Ellipse
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |