|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.geom.RectangularShape | +--java.awt.geom.Rectangle2D | +--java.awt.geom.Rectangle2D.Float
Inner classes inherited from class java.awt.geom.Rectangle2D | |
Rectangle2D.Double , Rectangle2D.Float |
Field Summary | |
float | height
The height of the rectangle. |
float | width
The width of the rectangle. |
float | x
The x coordinate of the rectangle. |
float | y
The y coordinate of the rectangle. |
Fields inherited from class java.awt.geom.Rectangle2D | |
OUT_BOTTOM , OUT_LEFT , OUT_RIGHT , OUT_TOP |
Constructor Summary | |
Rectangle2D.Float()
Constructs a new rectangle, initialized to location (0.0, 0.0) and size (0.0, 0.0). |
|
Rectangle2D.Float(float x,
float y,
float w,
float h)
Constructs and initializes a rectangle from the specified float coordinates. |
Method Summary | |
Rectangle2D | createIntersection(Rectangle2D r)
Return a new Rectangle2D object representing the intersection of this rectangle with the given rectangle. |
Rectangle2D | createUnion(Rectangle2D r)
Return a new Rectangle2D object representing the union of this rectangle with the given rectangle. |
double | getHeight()
Returns the height of the rectangle in double precision. |
double | getWidth()
Returns the width of the rectangle in double precision. |
double | getX()
Returns the X coordinate of the rectangle in double precision. |
double | getY()
Returns the Y coordinate of the rectangle in double precision. |
boolean | isEmpty()
Determines whether the rectangle is empty. |
int | outcode(double x,
double y)
Determines where the specified float coordinates lie with respect to this Rectangle. |
void | setRect(double x,
double y,
double w,
double h)
Sets the location and size of this rectangle to the specified double values. |
void | setRect(float x,
float y,
float w,
float h)
Sets the location and size of this rectangle to the specified float values. |
void | setRect(Rectangle2D r)
Sets this rectangle to be the same as the specified Rectangle. |
String | toString()
Returns the String representation of this Rectangle. |
Methods inherited from class java.awt.geom.Rectangle2D | |
add , add , add , contains , contains , equals , getBounds2D , getPathIterator , getPathIterator , intersect , intersects , intersectsLine , intersectsLine , outcode , setFrame , union |
Methods inherited from class java.awt.geom.RectangularShape | |
clone , contains , contains , getBounds , getCenterX , getCenterY , getFrame , getMaxX , getMaxY , getMinX , getMinY , intersects , setFrame , setFrame , setFrameFromCenter , setFrameFromCenter , setFrameFromDiagonal , setFrameFromDiagonal |
Methods inherited from class java.lang.Object | |
finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait |
Field Detail |
public float x
public float y
public float width
public float height
Constructor Detail |
public Rectangle2D.Float()
public Rectangle2D.Float(float x, float y, float w, float h)
x
- the x coordinate
y
- the y coordinate
width
- the width of the rectangle
height
- the height of the rectangleMethod Detail |
public double getX()
public double getY()
public double getWidth()
public double getHeight()
public boolean isEmpty()
public void setRect(float x, float y, float w, float h)
public void setRect(double x, double y, double w, double h)
public void setRect(Rectangle2D r)
public int outcode(double x, double y)
Rectangle2D.OUT_LEFT
,
Rectangle2D.OUT_TOP
,
Rectangle2D.OUT_RIGHT
,
Rectangle2D.OUT_BOTTOM
public Rectangle2D createIntersection(Rectangle2D r)
r
- the rectangle to be intersected withpublic Rectangle2D createUnion(Rectangle2D r)
r
- the rectangle to be combined withpublic String toString()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |