public class Rect extends Object
Negative coordinates and sizes are not supported, since they make no sense in the context of the packer, which deals only with positively sized regions.
This class contains a user data field for efficient hookup to external data structures as well as enough other hooks to efficiently plug into the rectangle packer.
Constructor and Description |
---|
Rect() |
Rect(int x,
int y,
int w,
int h,
Object userData) |
Rect(Object userData) |
Modifier and Type | Method and Description |
---|---|
boolean |
canContain(Rect other) |
Rect |
getNextLocation() |
Object |
getUserData() |
int |
h() |
int |
maxX()
Returns the maximum x-coordinate contained within this
rectangle.
|
int |
maxY()
Returns the maximum y-coordinate contained within this
rectangle.
|
void |
setNextLocation(Rect nextLocation) |
void |
setPosition(int x,
int y) |
void |
setSize(int w,
int h) |
void |
setUserData(Object obj) |
String |
toString() |
int |
w() |
int |
x() |
int |
y() |
public Rect()
public Rect(Object userData)
public Rect(int x, int y, int w, int h, Object userData)
public int x()
public int y()
public int w()
public int h()
public Object getUserData()
public Rect getNextLocation()
public void setPosition(int x, int y)
public void setSize(int w, int h) throws IllegalArgumentException
IllegalArgumentException
public void setUserData(Object obj)
public void setNextLocation(Rect nextLocation)
public int maxX()
public int maxY()
public boolean canContain(Rect other)
Copyright 2010 JogAmp Community.