|
||||||||||
| 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.Ellipse
public class Ellipse
Class Ellipse provides an ellipse DrawingItem. A circle is a special case of an ellipse with equal width and height.
The static defaultSize(), defaultWidth(), and defaultHeight() methods are provided to set the default size, width, and height. If an ellipse'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 ellipses (72). |
static double |
NORMAL_WIDTH
The normal width for ellipses (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 | |
|---|---|
Ellipse()
Construct a new ellipse. |
|
Ellipse(Ellipse theItem)
Construct a new ellipse with the same outline, fill paint, location, and size as the given ellipse. |
|
| Method Summary | |
|---|---|
Ellipse |
add()
Add this ellipse to the end of the default drawing's sequence of drawing items. |
Ellipse |
add(Drawing theDrawing)
Add this ellipse to the end of the given drawing's sequence of drawing items. |
Ellipse |
addFirst()
Add this ellipse to the beginning of the default drawing's sequence of drawing items. |
Ellipse |
addFirst(Drawing theDrawing)
Add this ellipse to the beginning of the given drawing's sequence of drawing items. |
Ellipse |
c(double x,
double y)
Set the center point of this ellipse's bounding box. |
Ellipse |
c(Point thePoint)
Set the center point of this ellipse's bounding box. |
Point |
circumferencePoint(double angle)
Returns the point on the circumference of this ellipse at the given angle relative to this ellipse's center. |
Point |
circumferencePoint(double angle,
double length)
Returns the point on the circumference of this ellipse at the given angle relative to this ellipse's center, extended outward by the given length. |
Point |
circumferencePointDegrees(double angle)
Returns the point on the circumference of this ellipse at the given angle relative to this ellipse's center. |
Point |
circumferencePointDegrees(double angle,
double length)
Returns the point on the circumference of this ellipse at the given angle relative to this ellipse's center, extended outward by the given length. |
static double |
defaultHeight()
Returns the default height for ellipses. |
static void |
defaultHeight(double theHeight)
Set the default height for ellipses. |
static Size |
defaultSize()
Returns the default size for ellipses. |
static void |
defaultSize(Size theSize)
Set the default size for ellipses. |
static double |
defaultWidth()
Returns the default width for ellipses. |
static void |
defaultWidth(double theWidth)
Set the default width for ellipses. |
Ellipse |
diameter(double theDiameter)
Set the width and height of this ellipse's bounding box to make this ellipse a circle. |
Ellipse |
e(double x,
double y)
Set the east middle point of this ellipse's bounding box. |
Ellipse |
e(Point thePoint)
Set the east middle point of this ellipse's bounding box. |
Ellipse |
fill(Fill theFill)
Set this ellipse's fill paint. |
Ellipse |
height(double theHeight)
Set the height of this ellipse's bounding box. |
Ellipse |
n(double x,
double y)
Set the north middle point of this ellipse's bounding box. |
Ellipse |
n(Point thePoint)
Set the north middle point of this ellipse's bounding box. |
Ellipse |
ne(double x,
double y)
Set the northeast corner point of this ellipse's bounding box. |
Ellipse |
ne(Point thePoint)
Set the northeast corner point of this ellipse's bounding box. |
Ellipse |
nw(double x,
double y)
Set the northwest corner point of this ellipse's bounding box. |
Ellipse |
nw(Point thePoint)
Set the northwest corner point of this ellipse's bounding box. |
Ellipse |
outline(Outline theOutline)
Set this ellipse's outline. |
Point |
perimeterIntersection(double x,
double y)
Returns the point of intersection between (1) this ellipse's perimeter and (2) the line passing through this ellipse's center and the given point. |
Point |
perimeterIntersection(Point point)
Returns the point of intersection between (1) this ellipse's perimeter and (2) the line passing through this ellipse's center and the given point. |
Ellipse |
s(double x,
double y)
Set the south middle point of this ellipse's bounding box. |
Ellipse |
s(Point thePoint)
Set the south middle point of this ellipse's bounding box. |
Ellipse |
se(double x,
double y)
Set the southeast corner point of this ellipse's bounding box. |
Ellipse |
se(Point thePoint)
Set the southeast corner point of this ellipse's bounding box. |
Ellipse |
size(Size theSize)
Set the size of this ellipse's bounding box. |
Ellipse |
sw(double x,
double y)
Set the southwest corner point of this ellipse's bounding box. |
Ellipse |
sw(Point thePoint)
Set the southwest corner point of this ellipse's bounding box. |
Ellipse |
w(double x,
double y)
Set the west middle point of this ellipse's bounding box. |
Ellipse |
w(Point thePoint)
Set the west middle point of this ellipse's bounding box. |
Ellipse |
width(double theWidth)
Set the width of this ellipse'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 Ellipse()
public Ellipse(Ellipse theItem)
theItem - Ellipse.
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 Ellipse outline(Outline theOutline)
outline in class RectangularItemtheOutline - Outline, or Outline.NONE.
public Ellipse fill(Fill theFill)
fill in class RectangularItemtheFill - Fill paint, or Fill.NONE.
public Ellipse 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 Ellipse width(double theWidth)
width in class RectangularItemtheWidth - Width.
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than 0.public Ellipse height(double theHeight)
height in class RectangularItemtheHeight - Height.
IllegalArgumentException - (unchecked exception) Thrown if theHeight is less than 0.public Ellipse diameter(double theDiameter)
theDiameter - Diameter.
IllegalArgumentException - (unchecked exception) Thrown if theDiameter is less than 0.
public Ellipse nw(double x,
double y)
nw in class RectangularItemx - X coordinate of northwest corner point.y - Y coordinate of northwest corner point.
public Ellipse nw(Point thePoint)
nw in class RectangularItemthePoint - Northwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse n(double x,
double y)
n in class RectangularItemx - X coordinate of north middle point.y - Y coordinate of north middle point.
public Ellipse n(Point thePoint)
n in class RectangularItemthePoint - North middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse ne(double x,
double y)
ne in class RectangularItemx - X coordinate of northeast corner point.y - Y coordinate of northeast corner point.
public Ellipse ne(Point thePoint)
ne in class RectangularItemthePoint - Northeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse w(double x,
double y)
w in class RectangularItemx - X coordinate of west middle point.y - Y coordinate of west middle point.
public Ellipse w(Point thePoint)
w in class RectangularItemthePoint - West middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse c(double x,
double y)
c in class RectangularItemx - X coordinate of center point.y - Y coordinate of center point.
public Ellipse c(Point thePoint)
c in class RectangularItemthePoint - Center point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse e(double x,
double y)
e in class RectangularItemx - X coordinate of east middle point.y - Y coordinate of east middle point.
public Ellipse e(Point thePoint)
e in class RectangularItemthePoint - East middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse sw(double x,
double y)
sw in class RectangularItemx - X coordinate of southwest corner point.y - Y coordinate of southwest corner point.
public Ellipse sw(Point thePoint)
sw in class RectangularItemthePoint - Southwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse s(double x,
double y)
s in class RectangularItemx - X coordinate of south middle point.y - Y coordinate of south middle point.
public Ellipse s(Point thePoint)
s in class RectangularItemthePoint - South middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public Ellipse se(double x,
double y)
se in class RectangularItemx - X coordinate of southeast corner point.y - Y coordinate of southeast corner point.
public Ellipse se(Point thePoint)
se in class RectangularItemthePoint - Southeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.public Ellipse add()
add in class RectangularItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public Ellipse add(Drawing theDrawing)
add in class RectangularItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public Ellipse addFirst()
addFirst in class RectangularItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public Ellipse addFirst(Drawing theDrawing)
addFirst in class RectangularItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public Point circumferencePoint(double angle)
angle - Angle (radians).
public Point circumferencePointDegrees(double angle)
angle - Angle (degrees).
public Point circumferencePoint(double angle,
double length)
angle - Angle (radians).length - Length to extend from circumference.
public Point circumferencePointDegrees(double angle,
double length)
angle - Angle (degrees).length - Length to extend from circumference.
public Point perimeterIntersection(Point point)
point - One point on the line.
public Point perimeterIntersection(double x,
double y)
x - X coordinate of one point on the line.y - Y coordinate of one point on the line.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||