public class Oval extends CurvedShape
Constructor and Description |
---|
Oval()
Create a filled, green oval with a default position and size.
|
Oval(int x,
int y,
int width,
int height)
Create an unfilled black oval whose bounding rectangle has the
specified upper-left corner and dimensions.
|
Oval(int x,
int y,
int width,
int height,
java.awt.Color c,
boolean fill)
Create an oval of the given color and filledness whose bounding
rectangle has the specified upper-left corner and dimensions.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(java.awt.Graphics g)
Paint this shape onto the given graphics context.
|
java.lang.String |
toString()
Answer the printed representation of this shape.
|
resize
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, recordWindow, removeFromWindow, rotateAround, setColor
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addTo, currentWindow, getBoundingBox, getCenterX, getCenterY, getColor, getHeight, getWidth, getX, getY, intersects, moveBy, moveTo, recordWindow, removeFromWindow, rotateAround, setColor
public Oval()
public Oval(int x, int y, int width, int height)
x
- the x coordinate of the upper left corner of the oval's
bounding rectangley
- the y coordinate of the upper left corner of the oval's
bounding rectanglewidth
- the width of the ovalheight
- the height of the ovalpublic Oval(int x, int y, int width, int height, java.awt.Color c, boolean fill)
x
- the x coordinate of the upper left corner of the oval's
bounding rectangley
- the y coordinate of the upper left corner of the oval's
bounding rectanglewidth
- the width of the ovalheight
- the height of the ovalc
- the color of the ovalfill
- should it be filled?public void paint(java.awt.Graphics g)
Shape