// (c) Tuomas J. Lukka package gzz.view; import gzz.*; import gzz.vob.*; /** Unify the concepts of cellview and cell content view. * This is a view that shows a cell in a box. * Whether it draws a box or not is not defined by this interface. *

* 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. */ public abstract class CellInBox { public static final String rcsid = "$Id: CellInBox.java,v 1.1 2002/10/29 07:30:58 tjl Exp $"; /** Place the contents of one cell into the given coord system. * The coordsys given shall be a mapping from the rectangle * (0,w)x(0,h) onto the screen. */ public abstract void place(Cell c, VobScene sc, Box b, ViewContext context); /** Get the default size of the cell. * @param c The cell to get size for, or null for a default size. */ public void getSize(Cell c, float[] out) { getSize(c, 1, out); } /** Get the default size of the cell at a given scale. * This method exists for the benefit of AWT, where fonts cannot * be scaled accurately. *

* Note that the returned width and height are in Box scale: * they are not multiplied by the scale parameter. * @param c The cell to get size for, or null for a default size. */ public void getSize(Cell c, float scale, float[] out) { getSize(c, out); } }