|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gzz.view.CellView
A view that shows a cell in a box. Whether it draws a box or not is not defined by this interface. A common pattern is that a CellView drawing a box calls a sub-cellview to draw the actual content.
When subclassing, you must override one of the getSize() methods; the others will work. If you don't, you'll get an infinite loop: the default implementations call each other.
Field Summary | |
static java.lang.String |
rcsid
|
Constructor Summary | |
CellView()
|
Method Summary | |
void |
getSize(Cell c,
float scale,
ViewContext context,
float[] out)
Get the default size of the cell at a given scale. |
void |
getSize(Cell c,
ViewContext context,
float[] out)
Get the default size of the cell. |
abstract void |
place(Cell c,
VobScene vs,
int box,
ViewContext context)
Place the contents of one cell into the given coord system. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String rcsid
Constructor Detail |
public CellView()
Method Detail |
public abstract void place(Cell c, VobScene vs, int box, ViewContext context)
box
- A coordinate system, into whose "unit square"
the cell will be placed.
Note that some coordinate systems
(box, orthoBox) set their "unit
square" not to be 0..1 x 0..1.public void getSize(Cell c, ViewContext context, float[] out)
c
- The cell to get size for, or null for a default size.public void getSize(Cell c, float scale, ViewContext context, float[] out)
Note that the returned width and height are in Box scale: they are not multiplied by the scale parameter.
c
- The cell to get size for, or null for a default size.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |