// (c) Tuomas J. Lukka package gzz.view; import gzz.*; import gzz.vob.*; /** A "plugin" which allows decoration of a CellInBox object by a CellPlacementHook. */ public class CellInBoxPlugin extends CellInBox { CellInBox sub; CellPlacementHook hook; public CellInBoxPlugin(CellInBox sub, CellPlacementHook hook) { this.sub = sub; this.hook = hook; } public void place(Cell c, VobScene sc, Box b, ViewContext context) { sub.place(c, sc, b, context); hook.placed(c, sc, b, context); } public void getSize(Cell c, float[] out) { sub.getSize(c, out); } public void getSize(Cell c, float scale, float[] out) { sub.getSize(c, scale, out); } }