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.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Level | |
| private Rect | |
| private Object | |
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Rect | |
| public Object | |
| public int | |
| public int | |
| public int | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | |
| public int | |
| public int | |
| public int |
| h | back to summary |
|---|---|
| private int h | |
| level | back to summary |
|---|---|
| private Level level | |
| nextLocation | back to summary |
|---|---|
| private Rect nextLocation | |
| userData | back to summary |
|---|---|
| private Object userData | |
| w | back to summary |
|---|---|
| private int w | |
| x | back to summary |
|---|---|
| private int x | |
| y | back to summary |
|---|---|
| private int y | |
| Rect | back to summary |
|---|---|
| public Rect() | |
| Rect | back to summary |
|---|---|
| public Rect(final Object userData) | |
| Rect | back to summary |
|---|---|
| public Rect(final int x, final int y, final int w, final int h, final Object userData) | |
| canContain | back to summary |
|---|---|
| public boolean canContain(final Rect other) | |
| getNextLocation | back to summary |
|---|---|
| public Rect getNextLocation() | |
| getUserData | back to summary |
|---|---|
| public Object getUserData() | |
| h | back to summary |
|---|---|
| public int h() | |
| maxX | back to summary |
|---|---|
| public int maxX() Returns the maximum x-coordinate contained within this rectangle. Note that this returns a different result than Java 2D's rectangles; for a rectangle of position (0, 0) and size (1, 1) this will return 0, not 1. Returns -1 if the width of this rectangle is 0. | |
| maxY | back to summary |
|---|---|
| public int maxY() Returns the maximum y-coordinate contained within this rectangle. Note that this returns a different result than Java 2D's rectangles; for a rectangle of position (0, 0) and size (1, 1) this will return 0, not 1. Returns -1 if the height of this rectangle is 0. | |
| setNextLocation | back to summary |
|---|---|
| public void setNextLocation(final Rect nextLocation) | |
| setPosition | back to summary |
|---|---|
| public void setPosition(final int x, final int y) | |
| setSize | back to summary |
|---|---|
| public void setSize(final int w, final int h) throws IllegalArgumentException | |
| setUserData | back to summary |
|---|---|
| public void setUserData(final Object obj) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| w | back to summary |
|---|---|
| public int w() | |
| x | back to summary |
|---|---|
| public int x() | |
| y | back to summary |
|---|---|
| public int y() | |