public class GridBoxManager extends BoxManager
| Constructor and Description | 
|---|
GridBoxManager()  | 
GridBoxManager(int cols)  | 
GridBoxManager(int cols,
              int rows)
Construct a cols * rows array of boxes. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBox(Rect box)  | 
void | 
addBox(Rect box,
      Dim dim)  | 
Rect | 
firstElement()  | 
Rect | 
getBox(int boxNo)  | 
int | 
getBoxCount()  | 
java.util.Vector<Rect> | 
getBoxes(Dim dimension)
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)
For the supplied dimension of the entire array of boxes, return the size
 of one (any) box. 
 | 
int | 
getCols()  | 
Rect | 
getMidBox()  | 
Point | 
getMidPoint(Dim dimension,
           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 dimension)
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. 
 | 
int | 
getRows()  | 
void | 
setCols(int cols)  | 
void | 
setRows(int rows)  | 
addPropertyChangeListener, getBox, getBoxContainingPoint, getBoxes, getBoxesReversed, getOrigin, getScale, isAccentuateMidBox, moveToEnd, propertyChange, removeBox, removePropertyChangeListener, setAccentuateMidBox, setBox, setScalepublic GridBoxManager(int cols)
public GridBoxManager(int cols,
                      int rows)
cols - the number of columns in the box array.rows - the number of rows in the box array.public GridBoxManager()
public int getBoxCount()
getBoxCount in class BoxManagerpublic Rect getMidBox()
getMidBox in class BoxManagerpublic int getCols()
public void setCols(int cols)
public int getRows()
public void setRows(int rows)
public Dim getBoxSize(Rect box, Dim dimension)
BoxManagergetBoxSize in class BoxManagerbox - the 0-based index of the box in the collection.dimension - the size of the overall array of boxes, in pixelspublic java.util.Vector<Rect> getBoxes(Dim dimension)
BoxManagergetBoxes in class BoxManagerdimension - the size of the overall array of boxes, in pixels.public Point getMidPoint(Dim dimension, Rect box)
BoxManagergetMidPoint in class BoxManagerdimension - the dimensions of the overall array of boxes.box - the box to retrieve.public java.util.Vector<Point> getMidPoints(Dim dimension)
BoxManagergetMidPoints in class BoxManagerdimension - the dimension of the entire array of boxes, in pixelspublic void addBox(Rect box)
addBox in class BoxManagerpublic void addBox(Rect box, Dim dim)
addBox in class BoxManagerbox - a Rect describing the left, right, top, and bottom of a box.dim - the dimensions of the grid to which the Rect's coordinates are
            relative.public Rect getBox(int boxNo)
getBox in class BoxManagerpublic Rect firstElement()
firstElement in class BoxManager