public abstract class BoxManager
extends java.lang.Object
implements java.beans.PropertyChangeListener
Constructor and Description |
---|
BoxManager() |
Modifier and Type | Method and Description |
---|---|
void |
addBox(Rect box) |
abstract void |
addBox(Rect margin,
Dim dim) |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
abstract Rect |
firstElement() |
Rect |
getBox(int boxNo) |
Rect |
getBox(int boxNo,
Dim size) |
Rect |
getBoxContainingPoint(Point p,
Dim d)
Find the box within the array containing a particular point, in reverse
order to the natural (drawing) order.
|
abstract int |
getBoxCount() |
java.util.Vector<Rect> |
getBoxes() |
abstract 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.
|
java.util.Vector<Rect> |
getBoxesReversed(Dim scale)
Return the boxes in reverse order, so that offspring are "on top" of
their ancestors.
|
abstract Dim |
getBoxSize(Rect selectedBox,
Dim dimension)
For the supplied dimension of the entire array of boxes, return the size
of one (any) box.
|
abstract Rect |
getMidBox() |
abstract 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).
|
abstract 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.
|
Point |
getOrigin(Dim size,
int selectedBoxNo) |
int |
getScale() |
boolean |
isAccentuateMidBox() |
void |
moveToEnd(Rect box) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
removeBox(Rect boxedMorphBox) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
setAccentuateMidBox(boolean accentuateMidBox) |
void |
setBox(Rect box,
Rect newBox,
Dim size) |
void |
setScale(int newValue) |
public void moveToEnd(Rect box)
public int getScale()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void setScale(int newValue)
public abstract void addBox(Rect margin, Dim dim)
margin
- 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 abstract int getBoxCount()
public abstract java.util.Vector<Rect> getBoxes(Dim dimension)
dimension
- the size of the overall array of boxes, in pixels.public Rect getBoxContainingPoint(Point p, Dim d)
p
- the point to locate within one of the particular boxesd
- the size of the overall array of boxes, in pixels.public abstract Dim getBoxSize(Rect selectedBox, Dim dimension)
selectedBox
- the 0-based index of the box in the collection.dimension
- the size of the overall array of boxes, in pixelspublic abstract Rect getMidBox()
public abstract Point getMidPoint(Dim dimension, Rect box)
dimension
- the dimensions of the overall array of boxes.box
- the box to retrieve.public abstract java.util.Vector<Point> getMidPoints(Dim dimension)
dimension
- the dimension of the entire array of boxes, in pixelspublic boolean isAccentuateMidBox()
public void setAccentuateMidBox(boolean accentuateMidBox)
public void removeBox(Rect boxedMorphBox)
public java.util.Vector<Rect> getBoxesReversed(Dim scale)
scale
- the size of the MorphView centre panel in pixels.public java.util.Vector<Rect> getBoxes()
public Rect getBox(int boxNo)
public void addBox(Rect box)
public abstract Rect firstElement()
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)