java.awt.geom

Class Ellipse2D.Double

Enclosing Class:
Ellipse2D
Implemented Interfaces:
Cloneable, Shape

public static class Ellipse2D.Double
extends Ellipse2D

The Double class defines an ellipse specified in double precision.

Nested Class Summary

Nested classes/interfaces inherited from class java.awt.geom.Ellipse2D

Ellipse2D.Double, Ellipse2D.Float

Field Summary

double
height
The overall height of the Ellipse2D.
double
width
The overall width of this Ellipse2D.
double
x
The x coordinate of the upper left corner of this Ellipse2D.
double
y
The y coordinate of the upper left corner of this Ellipse2D.

Constructor Summary

Double()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Double(double x, double y, double w, double h)
Constructs and initializes an Ellipse2D from the specified coordinates.

Method Summary

Rectangle2D
getBounds2D()
Returns the high precision bounding box of this Ellipse2D.
double
getHeight()
Returns the overall height of this Ellipse2D in double precision.
double
getWidth()
Returns the overall width of this Ellipse2D in double precision.
double
getX()
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
double
getY()
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
boolean
isEmpty()
Determines whether or not the bounding box of this Ellipse2D is empty.
void
setFrame(double x, double y, double w, double h)
Sets the location and size of this Ellipse2D to the specified double values.

Methods inherited from class java.awt.geom.Ellipse2D

contains, contains, getPathIterator, 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

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

height

public double height
The overall height of the Ellipse2D.

width

public double width
The overall width of this Ellipse2D.

x

public double x
The x coordinate of the upper left corner of this Ellipse2D.

y

public double y
The y coordinate of the upper left corner of this Ellipse2D.

Constructor Details

Double

public Double()
Constructs a new Ellipse2D, initialized to location (0, 0) and size (0, 0).
Usages and Demos :

View More Examples of Double()
   1: 
   2:       Ellipse2D ellipse = new Ellipse2D.Double();
   3:       ellipse.setFrame(rect);
   4:       g2.fill(ellipse);
   5:    }

View Full Code Here
   1:     public RingVertexStyle() {
   2:         super(new Ellipse2D.Double());
   3:     }
   4: 
   5:     public void setSize(int size) {

View Full Code Here
   1:     public DelineationVertexStyle() {
   2:         super(new Ellipse2D.Double());
   3:     }
   4: 
   5:     public void paint(Feature f, Graphics2D g, Viewport viewport)

View Full Code Here
   1:     public void init() {
   2:         circle = new Ellipse2D.Double();
   3:         ...
   4:         oval = new Ellipse2D.Double();
   5:         ...
   6:         leaf = new Ellipse2D.Double();
   7:         stem = new Ellipse2D.Double();

View Full Code Here
   1: 
   2:         Polygon2D p = new Polygon2D.Double();
   3:         p.moveTo(- 100.0f, - 25.0f);
   4:         p.lineTo(+ 100.0f, - 25.0f);
   5:         p.lineTo(- 50.0f, + 100.0f);

View Full Code Here

Double

public Double(double x,
              double y,
              double w,
              double h)
Constructs and initializes an Ellipse2D from the specified coordinates.
Parameters:
w - the width of the rectangle
h - the height of the rectangle
Usages and Demos :

View More Examples of Double(double x,double y,double w,double h)
   1: 
   2:     hr[0]=new Ellipse2D.Double(-d/2, -d/2, d, d);
   3:   }
   4: 
   5:   public int init(Point2D.Double p, int key) {

View Full Code Here
   1: 
   2:             return new java.awt.geom.Ellipse2D.Double(-.5, -.5, 1., 1.);
   3:         }
   4:         ...
   5: 
   6:         return new Double(-.5, -.5, 1., 1.);
   7:     }
   8: }

View Full Code Here
   1: 
   2:         hr[0] = new Ellipse2D.Double(-d / 2, -d / 2, d, d);
   3:     }
   4: 
   5:     public void connect(AInteractionsManager manager)

View Full Code Here
   1:   public static DrawableShape createCircle(double x, double y, double d) {
   2:     return new DrawableShape(new Ellipse2D.Double(-d/2, -d/2, d, d), x, y);
   3:   }
   4:         ...
   5:   public static DrawableShape createRectangle(double x, double y, double w, double h) {
   6:     return new DrawableShape(new Rectangle2D.Double(-w/2, -h/2, w, h), x, y);
   7:   }
   8: 
   9:   public void setMarkerColor(Color fillColor, Color edgeColor) {

View Full Code Here
   1:             renderer.setShapesFilled(true);
   2:             renderer.setSeriesShape(0, new Ellipse2D.Double(-3.0, -3.0, 6.0, 6.0));
   3:         ...
   4:             renderer.setSeriesShape(1, new Rectangle2D.Double(-3.0, -3.0, 6.0, 6.0));
   5:             GeneralPath s2 = new GeneralPath();
   6:             s2.moveTo(0.0f, -3.0f);
   7:             s2.lineTo(3.0f, 3.0f);

View Full Code Here

Method Details

getBounds2D

public Rectangle2D getBounds2D()
Returns the high precision bounding box of this Ellipse2D.
Specified by:
getBounds2D in interface Shape
Returns:
a Rectangle2D that is the bounding box of this Ellipse2D.

getHeight

public double getHeight()
Returns the overall height of this Ellipse2D in double precision.
Overrides:
getHeight in interface RectangularShape
Returns:
the height of this Ellipse2D.

getWidth

public double getWidth()
Returns the overall width of this Ellipse2D in double precision.
Overrides:
getWidth in interface RectangularShape
Returns:
the width of this Ellipse2D.

getX

public double getX()
Returns the X coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getX in interface RectangularShape
Returns:
the X coordinate of the upper left corner of the bounding box of this Ellipse2D.

getY

public double getY()
Returns the Y coordinate of the upper left corner of this Ellipse2D in double precision.
Overrides:
getY in interface RectangularShape
Returns:
the Y coordinate of the upper left corner of the bounding box of this Ellipse2D.

isEmpty

public boolean isEmpty()
Determines whether or not the bounding box of this Ellipse2D is empty.
Overrides:
isEmpty in interface RectangularShape
Returns:
true if the bounding box of this Ellipse2D is empty; false otherwise.

setFrame

public void setFrame(double x,
                     double y,
                     double w,
                     double h)
Sets the location and size of this Ellipse2D to the specified double values.
Overrides:
setFrame in interface RectangularShape
Parameters:
w - the width to which to set the width of this Ellipse2D
h - the height to which to set the height of this Ellipse2D