|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.Rect
Rect is a rectangle.
| Field Summary | |
static Rect |
buff
|
int |
height
rectangle height |
int |
width
rectangle width |
int |
x
x position |
int |
y
y position |
| Constructor Summary | |
Rect()
|
|
Rect(Dimension d)
|
|
Rect(int x,
int y,
int width,
int height)
Constructs a rectangle with the given x, y, width and height. |
|
| Method Summary | |
boolean |
equals(Object other)
Returns if this object is considered equal to the other object. |
Rect |
getAddition(Rect r2,
Rect dest)
|
Rect |
getIntersection(Rect r,
Rect dest)
Get the intersection between this Rect and another Rect. |
Rect |
getRect(Rect dest)
Get the bounding rectangle of the area. |
boolean |
intersects(Area other)
See if this Area intersects another. |
boolean |
intersects(Rect r)
|
boolean |
isIn(int x,
int y)
Check if the point is in the area. |
boolean |
isInside(int x,
int y)
|
Rect |
set(int x,
int y,
int w,
int h)
|
Rect |
set(Rect r)
|
Rect |
setCorners(int x1,
int y1,
int x2,
int y2)
|
String |
toString()
Return a String representation of this object. |
void |
unionWith(Rect other)
|
static Rect |
unNull(Rect r)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode |
| Field Detail |
public int x
public int y
public int width
public int height
public static Rect buff
| Constructor Detail |
public Rect(int x,
int y,
int width,
int height)
public Rect()
public Rect(Dimension d)
| Method Detail |
public Rect set(Rect r)
public Rect set(int x,
int y,
int w,
int h)
public static Rect unNull(Rect r)
public String toString()
Object
toString in class Objectpublic boolean intersects(Rect r)
public void unionWith(Rect other)
public Rect getIntersection(Rect r,
Rect dest)
r - The other Rect.dest - The destination for the intersection Rect values. This can be
either this Rect or the "r" Rect or it can be null.
public Rect getAddition(Rect r2,
Rect dest)
public boolean isInside(int x,
int y)
public boolean isIn(int x,
int y)
Area
isIn in interface Areapublic boolean intersects(Area other)
Area
intersects in interface Areapublic Rect getRect(Rect dest)
Area
getRect in interface Areadest - an optional destination Rect.
public boolean equals(Object other)
Object
equals in class Objectother - Another object to compare to.
public Rect setCorners(int x1,
int y1,
int x2,
int y2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||