API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.geom. Rectangle2D.Double View Source
Author(s)
Since
1.2
Version
Serial
Hierarchy
 Object
      RectangularShape
          Rectangle2D
              Rectangle2D.Double
Implements
 Serializable
Subclasses
Description
publicstatic class Rectangle2D.Double
  The Double class defines a rectangle specified in double coordinates.
See also:   
Constructors
public Rectangle2D.Double ()
  Constructs a new Rectangle2D, initialized to location (0, 0) and size (0, 0).
public Rectangle2D.Double (double x, double y, double w, double h)
  Constructs and initializes a Rectangle2D from the specified double coordinates.
Methods
Hide/Show inherited methods
public void add (double newx, double newy) [Inherited From Rectangle2D]
  Adds a point, specified by the double precision arguments newx and newy, to this Rectangle2D.
public void add (Point2D pt) [Inherited From Rectangle2D]
  Adds the Point2D object pt to this Rectangle2D.
public void add (Rectangle2D r) [Inherited From Rectangle2D]
  Adds a Rectangle2D object to this Rectangle2D.
public Object clone () [Inherited From RectangularShape]
  Creates a new object of the same class and with the same contents as this object.
public boolean contains (double x, double y) [Inherited From Rectangle2D]
  Tests if the specified coordinates are inside the boundary of the Shape.
public boolean contains (double x, double y, double w, double h) [Inherited From Rectangle2D]
  Tests if the interior of the Shape entirely contains the specified rectangular area.
public boolean contains (Point2D p) [Inherited From RectangularShape]
  Tests if a specified Point2D is inside the boundary of the Shape.
public boolean contains (Rectangle2D r) [Inherited From RectangularShape]
  Tests if the interior of the Shape entirely contains the specified Rectangle2D.
public Rectangle2D createIntersection (Rectangle2D r) [Specified in Rectangle2D]
  Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D.
public Rectangle2D createUnion (Rectangle2D r) [Specified in Rectangle2D]
  Returns a new Rectangle2D object representing the union of this Rectangle2D with the specified Rectangle2D.
public boolean equals (Object obj) [Inherited From Rectangle2D]
  Determines whether or not the specified Object is equal to this Rectangle2D.
public Rectangle getBounds () [Inherited From RectangularShape]
  Returns an integer Rectangle that completely encloses the Shape.
public Rectangle2D getBounds2D () [Overrides Rectangle2D]
  Returns a high precision and more accurate bounding box of the Shape than the getBounds method. Note that there is no guarantee that the returned Rectangle2D is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle2D. The bounding box returned by this method is usually tighter than that returned by the getBounds method and never fails due to overflow problems since the return value can be an instance of the Rectangle2D that uses double precision values to store the dimensions.
public double getCenterX () [Inherited From RectangularShape]
  Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
public double getCenterY () [Inherited From RectangularShape]
  Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
public Rectangle2D getFrame () [Inherited From RectangularShape]
  Returns the framing Rectangle2D that defines the overall shape of this object.
public double getHeight () [Specified in RectangularShape]
  Returns the height of the framing rectangle in double precision.
public double getMaxX () [Inherited From RectangularShape]
  Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
public double getMaxY () [Inherited From RectangularShape]
  Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
public double getMinX () [Inherited From RectangularShape]
  Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
public double getMinY () [Inherited From RectangularShape]
  Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
public PathIterator getPathIterator (AffineTransform at) [Inherited From Rectangle2D]
  Returns an iteration object that defines the boundary of this Rectangle2D.
public PathIterator getPathIterator (AffineTransform at, double flatness) [Inherited From Rectangle2D]
  Returns an iteration object that defines the boundary of the flattened Rectangle2D.
public double getWidth () [Specified in RectangularShape]
  Returns the width of the framing rectangle in double precision.
public double getX () [Specified in RectangularShape]
  Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
public double getY () [Specified in RectangularShape]
  Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
public int hashCode () [Inherited From Rectangle2D]
  Returns the hashcode for this Rectangle2D.
publicstatic void intersect (Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) [Inherited From Rectangle2D]
  Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
public boolean intersects (double x, double y, double w, double h) [Inherited From Rectangle2D]
  Tests if the interior of the Shape intersects the interior of a specified rectangular area.
public boolean intersects (Rectangle2D r) [Inherited From RectangularShape]
  Tests if the interior of the Shape intersects the interior of a specified Rectangle2D.
public boolean intersectsLine (double x1, double y1, double x2, double y2) [Inherited From Rectangle2D]
  Tests if the specified line segment intersects the interior of this Rectangle2D.
public boolean intersectsLine (Line2D l) [Inherited From Rectangle2D]
  Tests if the specified line segment intersects the interior of this Rectangle2D.
public boolean isEmpty () [Specified in RectangularShape]
  Determines whether the RectangularShape is empty.
public int outcode (double x, double y) [Specified in Rectangle2D]
  Determines where the specified coordinates lie with respect to this Rectangle2D.
public int outcode (Point2D p) [Inherited From Rectangle2D]
  Determines where the specified Point2D lies with respect to this Rectangle2D.
public void setFrame (double x, double y, double w, double h) [Inherited From Rectangle2D] [Specified in RectangularShape]
  Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values.
public void setFrame (Point2D loc, Dimension2D size) [Inherited From RectangularShape]
  Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
public void setFrame (Rectangle2D r) [Inherited From RectangularShape]
  Sets the framing rectangle of this Shape to be the specified Rectangle2D.
public void setFrameFromCenter (double centerX, double centerY, double cornerX, double cornerY) [Inherited From RectangularShape]
  Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
public void setFrameFromCenter (Point2D center, Point2D corner) [Inherited From RectangularShape]
  Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
public void setFrameFromDiagonal (double x1, double y1, double x2, double y2) [Inherited From RectangularShape]
  Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
public void setFrameFromDiagonal (Point2D p1, Point2D p2) [Inherited From RectangularShape]
  Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
public void setRect (double x, double y, double w, double h) [Specified in Rectangle2D]
  Sets the location and size of this Rectangle2D to the specified double values.
public void setRect (Rectangle2D r) [Overrides Rectangle2D]
  Sets this Rectangle2D to be the same as the specified Rectangle2D.
public String toString ()
  Returns the String representation of this Rectangle2D.
publicstatic void union (Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) [Inherited From Rectangle2D]
  Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
Fields
Hide/Show inherited fields
public double height
  The height of this Rectangle2D.
publicfinalstatic int OUT_BOTTOM = "8" [Inherited From Rectangle2D]
  The bitmask that indicates that a point lies below this Rectangle2D.
publicfinalstatic int OUT_LEFT = "1" [Inherited From Rectangle2D]
  The bitmask that indicates that a point lies to the left of this Rectangle2D.
publicfinalstatic int OUT_RIGHT = "4" [Inherited From Rectangle2D]
  The bitmask that indicates that a point lies to the right of this Rectangle2D.
publicfinalstatic int OUT_TOP = "2" [Inherited From Rectangle2D]
  The bitmask that indicates that a point lies above this Rectangle2D.
public double width
  The width of this Rectangle2D.
public double x
  The X coordinate of this Rectangle2D.
public double y
  The Y coordinate of this Rectangle2D.
Nested Classes
  Rectangle2D.Float
The Float class defines a rectangle specified in float coordinates.
  Rectangle2D.Double
The Double class defines a rectangle specified in double coordinates.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar