org.apache.pivot.wtk
Class Bounds
java.lang.Object
org.apache.pivot.wtk.Bounds
- All Implemented Interfaces:
- Serializable
public final class Bounds
- extends Object
- implements Serializable
Class representing the bounds of an object.
- See Also:
- Serialized Form
Method Summary |
boolean |
contains(Bounds bounds)
|
boolean |
contains(int x,
int y)
|
boolean |
contains(int x,
int y,
int width,
int height)
|
boolean |
contains(Point point)
|
static Bounds |
decode(String value)
|
boolean |
equals(Object object)
|
Point |
getLocation()
|
Dimensions |
getSize()
|
int |
hashCode()
|
Bounds |
intersect(Bounds bounds)
|
Bounds |
intersect(int x,
int y,
int width,
int height)
|
boolean |
intersects(Bounds bounds)
|
boolean |
intersects(int x,
int y,
int width,
int height)
|
boolean |
isEmpty()
|
Rectangle |
toRectangle()
|
String |
toString()
|
Bounds |
translate(int dx,
int dy)
|
Bounds |
translate(Point offset)
|
Bounds |
union(Bounds bounds)
|
Bounds |
union(int x,
int y,
int width,
int height)
|
x
public final int x
y
public final int y
width
public final int width
height
public final int height
X_KEY
public static final String X_KEY
- See Also:
- Constant Field Values
Y_KEY
public static final String Y_KEY
- See Also:
- Constant Field Values
WIDTH_KEY
public static final String WIDTH_KEY
- See Also:
- Constant Field Values
HEIGHT_KEY
public static final String HEIGHT_KEY
- See Also:
- Constant Field Values
Bounds
public Bounds(int x,
int y,
int width,
int height)
Bounds
public Bounds(Point origin,
Dimensions size)
Bounds
public Bounds(Bounds bounds)
Bounds
public Bounds(Dictionary<String,?> bounds)
Bounds
public Bounds(Rectangle rectangle)
getLocation
public Point getLocation()
getSize
public Dimensions getSize()
union
public Bounds union(int x,
int y,
int width,
int height)
union
public Bounds union(Bounds bounds)
intersect
public Bounds intersect(int x,
int y,
int width,
int height)
intersect
public Bounds intersect(Bounds bounds)
translate
public Bounds translate(int dx,
int dy)
translate
public Bounds translate(Point offset)
contains
public boolean contains(Point point)
contains
public boolean contains(int x,
int y)
contains
public boolean contains(Bounds bounds)
contains
public boolean contains(int x,
int y,
int width,
int height)
intersects
public boolean intersects(Bounds bounds)
intersects
public boolean intersects(int x,
int y,
int width,
int height)
isEmpty
public boolean isEmpty()
equals
public boolean equals(Object object)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toRectangle
public Rectangle toRectangle()
toString
public String toString()
- Overrides:
toString
in class Object
decode
public static Bounds decode(String value)