|
||||||||||
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
public abstract class Circle2D
The Circle2D class describes a circle that is defined by a bounding rectangle. It is implemented as a java.awt.geom.Ellipse2D that has been restricted such that the width must also equal the height. It also implements the Geometry2D interface.
This class is only the abstract superclass for all objects which store a 2D ellipse. The actual storage representation of the coordinates is left to the subclass.
Nested Class Summary | |
---|---|
static class |
Circle2D.Double
The Double class defines an ellipse specified in double precision. |
static class |
Circle2D.Float
The Float class defines an ellipse specified in float precision. |
Field Summary |
---|
Fields inherited from interface cmsc420.geom.Geometry2D |
---|
CIRCLE, POINT, RECTANGLE, SEGMENT |
Constructor Summary | |
---|---|
Circle2D()
|
Method Summary | |
---|---|
java.awt.geom.Point2D |
getCenter()
Gets the center point of this circle. |
abstract double |
getRadius()
Gets the radius of this circle. |
int |
getType()
Gets the type of this Geometry2D object. |
abstract void |
setCenter(java.awt.geom.Point2D point)
Sets the center point of this circle. |
abstract void |
setRadius(double radius)
Sets the radius of this circle. |
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, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.Shape |
---|
getBounds2D |
Constructor Detail |
---|
public Circle2D()
Method Detail |
---|
public int getType()
getType
in interface Geometry2D
public java.awt.geom.Point2D getCenter()
public abstract double getRadius()
public abstract void setCenter(java.awt.geom.Point2D point)
point
- center point of this circlepublic abstract void setRadius(double radius)
radius
- radius of this circle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |