pivot.wtk
Class Bounds
java.lang.Object
pivot.wtk.Bounds
public class Bounds
- extends java.lang.Object
Class representing the bounds of an object.
- Author:
- gbrown
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
public int x
y
public int y
width
public int width
height
public int height
X_KEY
public static final java.lang.String X_KEY
- See Also:
- Constant Field Values
Y_KEY
public static final java.lang.String Y_KEY
- See Also:
- Constant Field Values
WIDTH_KEY
public static final java.lang.String WIDTH_KEY
- See Also:
- Constant Field Values
HEIGHT_KEY
public static final java.lang.String HEIGHT_KEY
- See Also:
- Constant Field Values
Bounds
public Bounds()
Bounds
public Bounds(Dictionary<java.lang.String,?> bounds)
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(java.awt.Rectangle rectangle)
getLocation
public Point getLocation()
getSize
public Dimensions getSize()
union
public void union(Bounds bounds)
intersect
public void intersect(Bounds bounds)
translate
public void translate(int dx,
int dy)
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(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
toRectangle
public java.awt.Rectangle toRectangle()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object