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, setScale
public void addBox(Rect r)
addBox
in class BoxManager
public void addBox(Rect r, Dim scale)
addBox
in class BoxManager
r
- 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 BoxManager
box
- 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 BoxManager
public java.util.Vector<Rect> getBoxes(Dim screenSize)
BoxManager
getBoxes
in class BoxManager
screenSize
- the size of the overall array of boxes, in pixels.public void setBox(Rect shadowBox, Rect newBox, Dim size)
setBox
in class BoxManager
public Point getMidPoint(Dim scale, Rect box)
BoxManager
getMidPoint
in class BoxManager
scale
- the dimensions of the overall array of boxes.box
- the box to retrieve.public void removeBox(Rect box)
removeBox
in class BoxManager
public java.util.Vector<Point> getMidPoints(Dim scale)
BoxManager
getMidPoints
in class BoxManager
scale
- the dimension of the entire array of boxes, in pixelspublic Rect getMidBox()
getMidBox
in class BoxManager
public int getBoxCount()
getBoxCount
in class BoxManager
public Rect firstElement()
firstElement
in class BoxManager