|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Ellipse2D
cmsc420.geom.Circle2D
cmsc420.geom.Circle2D.Float
public static class Circle2D.Float
The Float class defines an ellipse specified in float precision.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cmsc420.geom.Circle2D |
---|
Circle2D.Double, Circle2D.Float |
Field Summary |
---|
Fields inherited from interface cmsc420.geom.Geometry2D |
---|
CIRCLE, POINT, RECTANGLE, SEGMENT |
Constructor Summary | |
---|---|
Circle2D.Float(float centerX,
float centerY,
float radius)
Constructs and initializes a Circle2D with the specified coordinates. |
|
Circle2D.Float(java.awt.geom.Point2D.Float center,
float radius)
Constructs and initializes a Circle2D with the specified coordinates. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns the high precision bounding box of this Ellipse2D. |
double |
getCenterX()
Gets the X coordinate of the center of this circle. |
double |
getCenterY()
Gets the Y coordinate of the center of this circle. |
double |
getHeight()
Gets the height of this circle. |
double |
getRadius()
Gets the radius of this circle. |
double |
getWidth()
Gets the width of this circle. |
double |
getX()
Gets the X coordinate of the origin of this circle. |
double |
getY()
Gets the Y coordinate of the origin of this circle. |
boolean |
isEmpty()
Determines whether or not the bounding box of this Ellipse2D is empty. |
void |
setCenter(java.awt.geom.Point2D point)
Sets the center point of this circle. |
void |
setFrame(double x,
double y,
double w,
double h)
Sets the location and size of this Ellipse2D to the specified double values. |
void |
setRadius(double radius)
Sets the radius of this circle. |
Methods inherited from class cmsc420.geom.Circle2D |
---|
getCenter, getType |
Methods inherited from class java.awt.geom.Ellipse2D |
---|
contains, contains, equals, getPathIterator, hashCode, intersects |
Methods inherited from class java.awt.geom.RectangularShape |
---|
clone, contains, contains, getBounds, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Circle2D.Float(float centerX, float centerY, float radius)
centerX
- X coordinate of the center of this circlecenterY
- Y coordinate of the center of this circleradius
- radius of this circlepublic Circle2D.Float(java.awt.geom.Point2D.Float center, float radius)
center
- center point of this circleradius
- radius of this circleMethod Detail |
---|
public double getRadius()
getRadius
in class Circle2D
public double getCenterX()
getCenterX
in class java.awt.geom.RectangularShape
public double getCenterY()
getCenterY
in class java.awt.geom.RectangularShape
public double getHeight()
getHeight
in class java.awt.geom.RectangularShape
public double getWidth()
getWidth
in class java.awt.geom.RectangularShape
public double getX()
getX
in class java.awt.geom.RectangularShape
public double getY()
getY
in class java.awt.geom.RectangularShape
public void setCenter(java.awt.geom.Point2D point)
setCenter
in class Circle2D
point
- center point of this circlepublic void setRadius(double radius)
setRadius
in class Circle2D
radius
- radius of this circlepublic boolean isEmpty()
isEmpty
in class java.awt.geom.RectangularShape
public void setFrame(double x, double y, double w, double h)
setFrame
in class java.awt.geom.RectangularShape
x
- the specified X coordinate to which to set the location of
the bounding box of this Ellipse2Dy
- the specified Y coordinate to which to set the location of
the bounding box of this Ellipse2Dw
- the specified width to which to set the width of this
Ellipse2Dh
- the specified height to which to set the height of this
Ellipse2D
java.lang.IllegalArgumentException
- if the width is not equal to the heightpublic java.awt.geom.Rectangle2D getBounds2D()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |