| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static class Rectangle2D.Double extends Rectangle2D implements Serializable
The Double
class defines a rectangle specified in
double coordinates.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
---|
Rectangle2D.Double, Rectangle2D.Float |
Field Summary | |
---|---|
double |
height
The height of this Rectangle2D . |
double |
width
The width of this Rectangle2D . |
double |
x
The X coordinate of this Rectangle2D . |
double |
y
The Y coordinate of this Rectangle2D . |
Fields inherited from class java.awt.geom.Rectangle2D |
---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
Constructor Summary | |
---|---|
Constructs a new Rectangle2D , initialized to
location (0, 0) and size (0, 0).
|
|
Rectangle2D.Double(double x, double y, double w, double h) Constructs and initializes a Rectangle2D
from the specified double coordinates.
|
Method Summary | |
---|---|
Rectangle2D |
Returns a new Rectangle2D object representing the
intersection of this Rectangle2D with the specified
Rectangle2D .
|
Rectangle2D |
Returns a new Rectangle2D object representing the
union of this Rectangle2D with the specified
Rectangle2D .
|
Rectangle2D |
|
double |
Returns the height of the framing rectangle in double precision.
|
double |
getWidth() Returns the width of the framing rectangle in double precision.
|
double |
getX() Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
|
double |
getY() Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
|
boolean |
isEmpty() Determines whether the RectangularShape is empty.
|
int |
outcode(double x, double y) Determines where the specified coordinates lie with respect to this Rectangle2D .
|
void |
setRect(double x, double y, double w, double h) Sets the location and size of this Rectangle2D
to the specified double values.
|
void |
Sets the location and size of this Rectangle2D
to the specified double values.
|
String |
toString() Returns the String representation of this
Rectangle2D .
|
Methods inherited from class java.awt.geom.Rectangle2D |
---|
add, add, add, contains, contains, createIntersection, createUnion, equals, getBounds2D, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, outcode, setFrame, setRect, setRect, union |
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double height
Rectangle2D
.
public double width
Rectangle2D
.
public double x
Rectangle2D
.
public double y
Rectangle2D
.
Constructor Detail |
---|
public Rectangle2D.Double()
Rectangle2D
, initialized to
location (0, 0) and size (0, 0).
public Rectangle2D.Double(double x, double y, double w, double h)
Rectangle2D
from the specified double
coordinates.
x
- the X coordinate of the upper-left corner
of the newly constructed Rectangle2D
y
- the Y coordinate of the upper-left corner
of the newly constructed Rectangle2D
w
- the width of the newly constructed
Rectangle2D
h
- the height of the newly constructed
Rectangle2D
Method Detail |
---|
public Rectangle2D createIntersection(Rectangle2D r)
createIntersection
in class Rectangle2D
r
public Rectangle2D createUnion(Rectangle2D r)
createUnion
in class Rectangle2D
r
public Rectangle2D getBounds2D()
getBounds2D
in class Rectangle2D
public double getHeight()
getHeight
in class RectangularShape
public double getWidth()
getWidth
in class RectangularShape
public double getX()
getX
in class RectangularShape
public double getY()
getY
in class RectangularShape
public boolean isEmpty()
isEmpty
in class RectangularShape
public int outcode(double x, double y)
outcode
in class Rectangle2D
x
y
public void setRect(double x, double y, double w, double h)
setRect
in class Rectangle2D
x
y
w
h
public void setRect(Rectangle2D r)
setRect
in class Rectangle2D
r
public String toString()
String
representation of this
Rectangle2D
.
toString
in class Object
String
representing this
Rectangle2D
.
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |