java.lang.Object | |||
↳ | java.awt.geom.RectangularShape | ||
↳ | java.awt.geom.Rectangle2D | ||
↳ | java.awt.geom.Rectangle2D.Float |
The Float
class defines a rectangle specified in float
coordinates.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.awt.geom.Rectangle2D
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
height | The height of this Rectangle2D . |
||||||||||
width | The width of this Rectangle2D . |
||||||||||
x | The X coordinate of this Rectangle2D . |
||||||||||
y | The Y coordinate of this Rectangle2D . |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
Rectangle2D , initialized to
location (0.0, 0.0) and size (0.0, 0.0). | |||||||||||
Constructs and initializes a
Rectangle2D
from the specified float coordinates. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a new
Rectangle2D object representing the
intersection of this Rectangle2D with the specified
Rectangle2D . | |||||||||||
Returns a new
Rectangle2D object representing the
union of this Rectangle2D with the specified
Rectangle2D . | |||||||||||
Returns the height of the framing rectangle
in
double precision. | |||||||||||
Returns the width of the framing rectangle in
double precision. | |||||||||||
Returns the X coordinate of the upper-left corner of
the framing rectangle in
double precision. | |||||||||||
Returns the Y coordinate of the upper-left corner of
the framing rectangle in
double precision. | |||||||||||
Determines whether the
RectangularShape is empty. | |||||||||||
Determines where the specified coordinates lie with respect
to this
Rectangle2D . | |||||||||||
Sets the location and size of this
Rectangle2D
to the specified double values. | |||||||||||
Sets the location and size of this
Rectangle2D
to the specified float values. | |||||||||||
Sets this
Rectangle2D to be the same as the specified
Rectangle2D . | |||||||||||
Returns the
String representation of this
Rectangle2D . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.awt.geom.Rectangle2D
| |||||||||||
From class
java.awt.geom.RectangularShape
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.awt.Shape
|
The height of this Rectangle2D
.
The width of this Rectangle2D
.
The X coordinate of this Rectangle2D
.
The Y coordinate of this Rectangle2D
.
Constructs a new Rectangle2D
, initialized to
location (0.0, 0.0) and size (0.0, 0.0).
Constructs and initializes a Rectangle2D
from the specified float
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 |
Returns a new Rectangle2D
object representing the
intersection of this Rectangle2D
with the specified
Rectangle2D
.
r | the Rectangle2D to be intersected with
this Rectangle2D |
---|
Rectangle2D
contained in both
the specified Rectangle2D
and in this
Rectangle2D
.Returns a new Rectangle2D
object representing the
union of this Rectangle2D
with the specified
Rectangle2D
.
r | the Rectangle2D to be combined with
this Rectangle2D |
---|
Rectangle2D
containing both
the specified Rectangle2D
and this
Rectangle2D
.Returns the height of the framing rectangle
in double
precision.
Returns the width of the framing rectangle in
double
precision.
Returns the X coordinate of the upper-left corner of
the framing rectangle in double
precision.
Returns the Y coordinate of the upper-left corner of
the framing rectangle in double
precision.
Determines whether the RectangularShape
is empty.
When the RectangularShape
is empty, it encloses no
area.
true
if the RectangularShape
is empty;
false
otherwise.Determines where the specified coordinates lie with respect
to this Rectangle2D
.
This method computes a binary OR of the appropriate mask values
indicating, for each side of this Rectangle2D
,
whether or not the specified coordinates are on the same side
of the edge as the rest of this Rectangle2D
.
x | the specified X coordinate |
---|---|
y | the specified Y coordinate |
Sets the location and size of this Rectangle2D
to the specified double
values.
x | the X coordinate of the upper-left corner
of this Rectangle2D |
---|---|
y | the Y coordinate of the upper-left corner
of this Rectangle2D |
w | the width of this Rectangle2D |
h | the height of this Rectangle2D |
Sets the location and size of this Rectangle2D
to the specified float
values.
x | the X coordinate of the upper-left corner
of this Rectangle2D |
---|---|
y | the Y coordinate of the upper-left corner
of this Rectangle2D |
w | the width of this Rectangle2D |
h | the height of this Rectangle2D |
Sets this Rectangle2D
to be the same as the specified
Rectangle2D
.
r | the specified Rectangle2D |
---|
Returns the String
representation of this
Rectangle2D
.
String
representing this
Rectangle2D
.