|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.draw.item.DrawingItem
edu.rit.draw.item.OutlinedItem
edu.rit.draw.item.FilledItem
edu.rit.draw.item.ShapeItem
edu.rit.draw.item.RectangularItem
edu.rit.draw.item.Oval
public class Oval
Class Oval provides an oval DrawingItem. An oval is a rectangle whose narrower sides have been rounded into half-circles:

The static defaultSize(), defaultWidth(), and defaultHeight() methods are provided to set the default size, width, and height. If an oval's size, width, or height is not specified, the current default size, width, or height is used.
| Field Summary | |
|---|---|
static double |
NORMAL_HEIGHT
The normal height for ovals (72). |
static double |
NORMAL_WIDTH
The normal width for ovals (72). |
| Fields inherited from class edu.rit.draw.item.FilledItem |
|---|
NORMAL_FILL |
| Fields inherited from class edu.rit.draw.item.OutlinedItem |
|---|
NORMAL_OUTLINE |
| Constructor Summary | |
|---|---|
Oval()
Construct a new oval. |
|
Oval(Oval theItem)
Construct a new oval with the same outline, fill paint, location, and size as the given oval. |
|
| Method Summary | |
|---|---|
Oval |
add()
Add this oval to the end of the default drawing's sequence of drawing items. |
Oval |
add(Drawing theDrawing)
Add this oval to the end of the given drawing's sequence of drawing items. |
Oval |
addFirst()
Add this oval to the beginning of the default drawing's sequence of drawing items. |
Oval |
addFirst(Drawing theDrawing)
Add this oval to the beginning of the given drawing's sequence of drawing items. |
Oval |
c(double x,
double y)
Set the center point of this oval's bounding box. |
Oval |
c(Point thePoint)
Set the center point of this oval's bounding box. |
static double |
defaultHeight()
Returns the default height for ovals. |
static void |
defaultHeight(double theHeight)
Set the default height for ovals. |
static Size |
defaultSize()
Returns the default size for ovals. |
static void |
defaultSize(Size theSize)
Set the default size for ovals. |
static double |
defaultWidth()
Returns the default width for ovals. |
static void |
defaultWidth(double theWidth)
Set the default width for ovals. |
Oval |
e(double x,
double y)
Set the east middle point of this oval's bounding box. |
Oval |
e(Point thePoint)
Set the east middle point of this oval's bounding box. |
Oval |
fill(Fill theFill)
Set this oval's fill paint. |
Oval |
height(double theHeight)
Set the height of this oval's bounding box. |
Oval |
n(double x,
double y)
Set the north middle point of this oval's bounding box. |
Oval |
n(Point thePoint)
Set the north middle point of this oval's bounding box. |
Oval |
ne(double x,
double y)
Set the northeast corner point of this oval's bounding box. |
Oval |
ne(Point thePoint)
Set the northeast corner point of this oval's bounding box. |
Oval |
nw(double x,
double y)
Set the northwest corner point of this oval's bounding box. |
Oval |
nw(Point thePoint)
Set the northwest corner point of this oval's bounding box. |
Oval |
outline(Outline theOutline)
Set this oval's outline. |
Oval |
s(double x,
double y)
Set the south middle point of this oval's bounding box. |
Oval |
s(Point thePoint)
Set the south middle point of this oval's bounding box. |
Oval |
se(double x,
double y)
Set the southeast corner point of this oval's bounding box. |
Oval |
se(Point thePoint)
Set the southeast corner point of this oval's bounding box. |
Oval |
size(Size theSize)
Set the size of this oval's bounding box. |
Oval |
sw(double x,
double y)
Set the southwest corner point of this oval's bounding box. |
Oval |
sw(Point thePoint)
Set the southwest corner point of this oval's bounding box. |
Oval |
w(double x,
double y)
Set the west middle point of this oval's bounding box. |
Oval |
w(Point thePoint)
Set the west middle point of this oval's bounding box. |
Oval |
width(double theWidth)
Set the width of this oval's bounding box. |
| Methods inherited from class edu.rit.draw.item.RectangularItem |
|---|
height, nw, readExternal, width, writeExternal |
| Methods inherited from class edu.rit.draw.item.ShapeItem |
|---|
draw |
| Methods inherited from class edu.rit.draw.item.FilledItem |
|---|
defaultFill, defaultFill, fill |
| Methods inherited from class edu.rit.draw.item.OutlinedItem |
|---|
defaultOutline, defaultOutline, outline |
| Methods inherited from class edu.rit.draw.item.DrawingItem |
|---|
boundingBox, c, e, n, ne, s, se, size, sw, w |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double NORMAL_WIDTH
public static final double NORMAL_HEIGHT
| Constructor Detail |
|---|
public Oval()
public Oval(Oval theItem)
theItem - Oval.
NullPointerException - (unchecked exception) Thrown if theItem is null.| Method Detail |
|---|
public static Size defaultSize()
public static void defaultSize(Size theSize)
theSize - Default size.
IllegalArgumentException - (unchecked exception) Thrown if the width or the height of
theSize is less than 0.public static double defaultWidth()
public static void defaultWidth(double theWidth)
theWidth - Default width.
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than 0.public static double defaultHeight()
public static void defaultHeight(double theHeight)
theHeight - Default height.
IllegalArgumentException - (unchecked exception) Thrown if theHeight is less than 0.public Oval outline(Outline theOutline)
outline in class RectangularItemtheOutline - Outline, or Outline.NONE.
public Oval fill(Fill theFill)
fill in class RectangularItemtheFill - Fill paint, or Fill.NONE.
public Oval size(Size theSize)
size in class RectangularItemtheSize - Size.
IllegalArgumentException - (unchecked exception) Thrown if the width or the height of
theSize is less than 0.public Oval width(double theWidth)
width in class RectangularItemtheWidth - Width.
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than 0.public Oval height(double theHeight)
height in class RectangularItemtheHeight - Height.
IllegalArgumentException - (unchecked exception) Thrown if theHeight is less than 0.
public Oval nw(double x,
double y)
nw in class RectangularItemx - X coordinate of northwest corner point.y - Y coordinate of northwest corner point.
public Oval nw(Point thePoint)
nw in class RectangularItemthePoint - Northwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval n(double x,
double y)
n in class RectangularItemx - X coordinate of north middle point.y - Y coordinate of north middle point.
public Oval n(Point thePoint)
n in class RectangularItemthePoint - North middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval ne(double x,
double y)
ne in class RectangularItemx - X coordinate of northeast corner point.y - Y coordinate of northeast corner point.
public Oval ne(Point thePoint)
ne in class RectangularItemthePoint - Northeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval w(double x,
double y)
w in class RectangularItemx - X coordinate of west middle point.y - Y coordinate of west middle point.
public Oval w(Point thePoint)
w in class RectangularItemthePoint - West middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval c(double x,
double y)
c in class RectangularItemx - X coordinate of center point.y - Y coordinate of center point.
public Oval c(Point thePoint)
c in class RectangularItemthePoint - Center point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval e(double x,
double y)
e in class RectangularItemx - X coordinate of east middle point.y - Y coordinate of east middle point.
public Oval e(Point thePoint)
e in class RectangularItemthePoint - East middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval sw(double x,
double y)
sw in class RectangularItemx - X coordinate of southwest corner point.y - Y coordinate of southwest corner point.
public Oval sw(Point thePoint)
sw in class RectangularItemthePoint - Southwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval s(double x,
double y)
s in class RectangularItemx - X coordinate of south middle point.y - Y coordinate of south middle point.
public Oval s(Point thePoint)
s in class RectangularItemthePoint - South middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Oval se(double x,
double y)
se in class RectangularItemx - X coordinate of southeast corner point.y - Y coordinate of southeast corner point.
public Oval se(Point thePoint)
se in class RectangularItemthePoint - Southeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.public Oval add()
add in class RectangularItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public Oval add(Drawing theDrawing)
add in class RectangularItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public Oval addFirst()
addFirst in class RectangularItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public Oval addFirst(Drawing theDrawing)
addFirst in class RectangularItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||