//(c): Matti Katila package gzz.modules.pp; import gzz.*; import gzz.vob.*; import gzz.impl.*; import gzz.modules.pp.*; import gzz.view.*; import gzz.view.buoy.*; public class PPViewNG implements BuoyLinkListener { public static final String rcsid = "$Id: PPViewNG.java,v 1.1 2003/02/05 02:27:20 mudyc Exp $"; private static boolean dbg = false; private static void pa(String s) { System.err.println(s); } // Geometry /** The width of the main view. */ public float mainWidth = 600; /** The width of the left edge panel. */ public float leftPanelWidth = 100; /** The height of the entries in the left edge panel. */ public float leftPanelObjectHeight = 100; /** The "over-size" of the entries in the left panel */ public float leftPanelRealHeight = 170, leftPanelRealWidth = 230; /** The zoom in the left panel */ public float leftPanelZoom = .8f; /** The height of the main view. */ public float mainHeight = 600; /** The Y position of the main view. */ public float mainY = 100; /** Buoy floater settings. */ public float buoyCenterY = 400, buoyRadius = 400; /** Buoy viewport geometry. */ public float buoyVPWidth = 400, buoyVPHeight = 400; /** Link buoy viewport geometry. */ public float linkbuoyVPWidth = 200, linkbuoyVPHeight = 100; /** The center of the visible area. */ float centerX(VobScene vs) { return (vs.size.width-leftPanelWidth)/2; } private Space space; private PPActions pp_act; public PPViewNG(Space s, PPActions ppa) { space = s; pp_act = ppa; } public void render(VobScene vs, int into) { int mainctr = vs.translateCS(0, "MAINVPCTR", centerX(vs), mainY + mainHeight/2); int frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, (-mainWidth)/2, -mainHeight/2, 1, 1, mainWidth, mainHeight); vs.activate(frameCS); // cell to frame CS int c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10); vs.matcher.add(frameCS, c2fCS, "C2F"); } // mainNode = adaptor.createMainNode(None, self.avc.getAccursed(), self) // mainNode.renderMain(vs, 0) // implement LinkListener public void link(int dir, int anchorCS, BuoyViewNodeType otherNode, Object linkId, Object otherAnchor) { // draw the buoys etc... pa(" Now draw buoy!"); } }