| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private int | |
| private final LevelSet | |
| private int | |
| private final List | |
| private static final Comparator | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| private void | |
| public void | |
| public boolean | couldAllocateIfCompacted(final Rect rect)
Indicates whether this Level could satisfy an allocation request if it were compacted. |
| public void | |
| public int | |
| public boolean | |
| public Iterator | |
| public boolean | |
| public void | updateRectangleReferences()
Updates the references to the Rect objects in this Level with the "next locations" of those Rects. |
| public void | |
| public int | |
| public int |
| freeList | back to summary |
|---|---|
| private List<Rect> freeList | |
| height | back to summary |
|---|---|
| private int height | |
| holder | back to summary |
|---|---|
| private final LevelSet holder | |
| nextAddX | back to summary |
|---|---|
| private int nextAddX | |
| rects | back to summary |
|---|---|
| private final List<Rect> rects | |
| rectXComparator | back to summary |
|---|---|
| private static final Comparator<Rect> rectXComparator | |
| width | back to summary |
|---|---|
| private final int width | |
| yPos | back to summary |
|---|---|
| private final int yPos | |
| Level | back to summary |
|---|---|
| public Level(final int width, final int height, final int yPos, final LevelSet holder) | |
| add | back to summary |
|---|---|
| public boolean add(final Rect rect) Tries to add the given rectangle to this level only allowing non-disruptive changes like trivial expansion of the last level in the RectanglePacker and allocation from the free list. More disruptive changes like compaction of the level must be requested explicitly. | |
| coalesceFreeList | back to summary |
|---|---|
| private void coalesceFreeList() | |
| compact | back to summary |
|---|---|
| public void compact(final Object backingStore, final BackingStoreManager manager) | |
| couldAllocateIfCompacted | back to summary |
|---|---|
| public boolean couldAllocateIfCompacted(final Rect rect) Indicates whether this Level could satisfy an allocation request if it were compacted. | |
| dumpFreeSpace | back to summary |
|---|---|
| public void dumpFreeSpace() | |
| h | back to summary |
|---|---|
| public int h() | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Indicates whether this Level contains no rectangles. | |
| iterator | back to summary |
|---|---|
| public Iterator | |
| remove | back to summary |
|---|---|
| public boolean remove(final Rect rect) Removes the given Rect from this Level. | |
| updateRectangleReferences | back to summary |
|---|---|
| public void updateRectangleReferences() Updates the references to the Rect objects in this Level with the "next locations" of those Rects. This is actually used to update the new Rects in a newly laid-out LevelSet with the original Rects. | |
| visit | back to summary |
|---|---|
| public void visit(final RectVisitor visitor) Visits all Rects contained in this Level. | |
| w | back to summary |
|---|---|
| public int w() | |
| yPos | back to summary |
|---|---|
| public int yPos() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(final Rect
the first object to be compared. r1, final Rect the second object to be compared. r2)Implements java. |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Implements java. |
| RectXComparator | back to summary |
|---|---|
| pack-priv RectXComparator() | |
| compare | back to summary |
|---|---|
| public int compare(final Rect r1, final Rect r2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Implements java. Doc from java. Indicates whether some other object is "equal to"
this comparator. This method must obey the general contract of
Note that it is always safe not to override
| |