public class FreeBoxManager extends BoxManager
| Constructor and Description |
|---|
FreeBoxManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBox(Rect r) |
void |
addBox(Rect r,
Dim scale) |
Rect |
firstElement() |
int |
getBoxCount() |
java.util.Vector<Rect> |
getBoxes(Dim screenSize)
For the given dimension of the entire array of boxes, return a vector of
Rectangles describing the corners of each box, in row-major order.
|
Dim |
getBoxSize(Rect box,
Dim dimension)
Returns null, as doubleBoxes are not of uniform size.
|
Rect |
getMidBox() |
Point |
getMidPoint(Dim scale,
Rect box)
Given supplied dimension of the entire array of boxes, return the
midpoint of the nth box (starting with n = 0).
|
java.util.Vector<Point> |
getMidPoints(Dim scale)
For the given dimension of the entire array of boxes, return a vector of
Points describing the midpoints of each box, in row-major order.
|
void |
moveToEnd(Rect box) |
void |
removeBox(Rect box) |
void |
setBox(Rect shadowBox,
Rect newBox,
Dim size) |
addPropertyChangeListener, getBox, getBox, getBoxContainingPoint, getBoxes, getBoxesReversed, getOrigin, getScale, isAccentuateMidBox, propertyChange, removePropertyChangeListener, setAccentuateMidBox, setScalepublic void addBox(Rect r)
addBox in class BoxManagerpublic void addBox(Rect r, Dim scale)
addBox in class BoxManagerr - a Rect describing the left, right, top, and bottom of a box.scale - the dimensions of the grid to which the Rect's coordinates are
relative.public Dim getBoxSize(Rect box, Dim dimension)
getBoxSize in class BoxManagerbox - the 0-based index of the box in the collection.dimension - the size of the overall array of boxes, in pixelspublic void moveToEnd(Rect box)
moveToEnd in class BoxManagerpublic java.util.Vector<Rect> getBoxes(Dim screenSize)
BoxManagergetBoxes in class BoxManagerscreenSize - the size of the overall array of boxes, in pixels.public void setBox(Rect shadowBox, Rect newBox, Dim size)
setBox in class BoxManagerpublic Point getMidPoint(Dim scale, Rect box)
BoxManagergetMidPoint in class BoxManagerscale - the dimensions of the overall array of boxes.box - the box to retrieve.public void removeBox(Rect box)
removeBox in class BoxManagerpublic java.util.Vector<Point> getMidPoints(Dim scale)
BoxManagergetMidPoints in class BoxManagerscale - the dimension of the entire array of boxes, in pixelspublic Rect getMidBox()
getMidBox in class BoxManagerpublic int getBoxCount()
getBoxCount in class BoxManagerpublic Rect firstElement()
firstElement in class BoxManager