
public abstract class Dimension2D implements Cloneable {
// Protected Constructors
protected Dimension2D();
// Property Accessor Methods (by property name)
public abstract double getHeight();
public abstract double getW idth();
// Public Instance Methods
public void setSize(Dimension2D d);
public abstract void setSize(double width, double height);
// Public Methods Overriding Object
public Object clone();
}
Hierar chy: Object→ Dimension2D(Cloneable)
Subc lasses: Dimension
Passed To: Arc2D.setArc(), Dimension2D.setSize(), RectangularShape.setFrame()
Ellipse2D Ja va 1.2
java.awt.geom cloneable shape
This abstract class is a java.awt.Shape that repr esents an ellipse (or a circle). Ellipse2D is a
subclass of RectangularShape, and for this reason, the ellipse is defined by its bounding
rectangle. The width and height of the bounding rectangle specify the length of the two
axes of the ellipse. (If the width and height are equal, the ellipse is a circle.) The X and
Y coordinates of the ellipse specify the upper-left corner of the bounding rectangle;
note that this point actually falls outside of the ellipse. The setFrameFromCenter() method,
inherited from RectangularShape, allows you to define the ellipse by specifying the center
and one corner. Note that Ellipse2D can only repr esent ellipses whose axes are parallel
to the X and Y axes of the coordinate system. In order to work with rotated ellipses,
use the ...