|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectBounds
public class Bounds
Represents a immutable two-dimensional rectangle, normally used for representing the bounds of a planar object.
| Field Summary | |
|---|---|
static Bounds |
EMPTY_BOUNDS
An object representing an empty bounding rectangle. |
| Method Summary | |
|---|---|
Bounds |
add(Bounds o)
Returns a bounding rectangle containing both this rectangle and the given rectangle. |
boolean |
contains(Bounds o)
Returns true if the given rectangle lies
entirely within this rectangle, even if it shares a
boundary with this rectangle. |
static Bounds |
create(double x,
double y,
double width,
double height)
Returns a rectangle starting at the given x- and y-coordinates and extending for the given width and height. |
double |
getHeight()
Returns the height of this rectangle. |
double |
getWidth()
Returns the width of this rectangle. |
double |
getX()
Returns the least x-coordinate contained
within this rectangle. |
double |
getY()
Returns the least y-coordinate contained
within this rectangle. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Bounds EMPTY_BOUNDS
| Method Detail |
|---|
public boolean contains(Bounds o)
true if the given rectangle lies
entirely within this rectangle, even if it shares a
boundary with this rectangle.
public Bounds add(Bounds o)
public double getX()
x-coordinate contained
within this rectangle.
public double getY()
y-coordinate contained
within this rectangle.
public double getWidth()
public double getHeight()
public java.lang.String toString()
toString in class java.lang.Object
public static Bounds create(double x,
double y,
double width,
double height)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||