|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.babaroga.test.packing.RectanglePacker
public abstract class RectanglePacker
Abstract base class for all rectangle packers. Rectangle packers should return the collection of packed rectangles in the same order that they were supplied.
| Constructor Summary | |
|---|---|
RectanglePacker()
|
|
| Method Summary | |
|---|---|
abstract java.util.Collection<java.awt.Rectangle> |
pack(int width,
int height,
java.util.Collection<java.awt.Rectangle> rectangles)
Packs the supplied rectangles into the specified bounds. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RectanglePacker()
| Method Detail |
|---|
public abstract java.util.Collection<java.awt.Rectangle> pack(int width,
int height,
java.util.Collection<java.awt.Rectangle> rectangles)
throws java.lang.IllegalArgumentException
width - The width of the bounding rectangle.height - The height of the bounding rectangle.rectangles - The rectangles to be packed.
java.lang.IllegalArgumentException - If any rectangles are empty (zero length dimensions).
java.lang.IllegalArgumentException - If width or height are <= 0.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||