if (ctx.isDynamic()) { BaseScriptingEnvironment se; se = new BaseScriptingEnvironment(ctx);
/** * Invoked to handle an <code>Element</code> for a given <code>BridgeContext</code>. * For example, see the <code>SVGTitleElementBridge</code>. * * @param ctx the bridge context to use * @param e the element being handled */ public void handleElement(BridgeContext ctx, Element e) { if (ctx.isDynamic()) { this.e = e; this.ctx = ctx; ((SVGOMElement) e).setSVGContext(this); } }
/** * Invoked to handle an <code>Element</code> for a given <code>BridgeContext</code>. * For example, see the <code>SVGTitleElementBridge</code>. * * @param ctx the bridge context to use * @param e the element being handled */ public void handleElement(BridgeContext ctx, Element e) { if (ctx.isDynamic()) { this.e = e; this.ctx = ctx; ((SVGOMElement) e).setSVGContext(this); } }
/** * Invoked to handle an <code>Element</code> for a given <code>BridgeContext</code>. * For example, see the <code>SVGTitleElementBridge</code>. * * @param ctx the bridge context to use * @param e the element being handled */ public void handleElement(BridgeContext ctx, Element e) { if (ctx.isDynamic()) { this.e = e; this.ctx = ctx; ((SVGOMElement) e).setSVGContext(this); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. This is called after all the children * of the node have been constructed and added, so it is safe to * do work that depends on being able to see your children nodes * in this method. * * @param ctx the bridge context to use * @param doc the document node that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Document doc, RootGraphicsNode node) { if (ctx.isDynamic()) { ctx.bind(doc, node); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. This is called after all the children * of the node have been constructed and added, so it is safe to * do work that depends on being able to see your children nodes * in this method. * * @param ctx the bridge context to use * @param doc the document node that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Document doc, RootGraphicsNode node) { if (ctx.isDynamic()) { ctx.bind(doc, node); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. This is called after all the children * of the node have been constructed and added, so it is safe to * do work that depends on being able to see your children nodes * in this method. * * @param ctx the bridge context to use * @param doc the document node that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Document doc, RootGraphicsNode node) { if (ctx.isDynamic()) { ctx.bind(doc, node); } }
/** * This method ensures that any modification to a text * element and its children is going to be reflected * into the GVT tree. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { super.initializeDynamicSupport(ctx, e, node); if (ctx.isDynamic()) { // Only add the listeners if we are dynamic. addTextEventListeners(ctx, (NodeEventTarget) e); } }
/** * This method ensures that any modification to a text * element and its children is going to be reflected * into the GVT tree. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { super.initializeDynamicSupport(ctx, e, node); if (ctx.isDynamic()) { // Only add the listeners if we are dynamic. addTextEventListeners(ctx, (NodeEventTarget) e); } }
/** * This method ensures that any modification to a text * element and its children is going to be reflected * into the GVT tree. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { super.initializeDynamicSupport(ctx, e, node); if (ctx.isDynamic()) { // Only add the listeners if we are dynamic. addTextEventListeners(ctx, (NodeEventTarget) e); } }
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }
protected void gatherRegionInfo(BridgeContext ctx, Element rgn, float verticalAlign, List regions) { boolean isStatic = !ctx.isDynamic(); for (Node n = getFirstChild(rgn); n != null; n = getNextSibling(n)) { if (n.getNodeType() != Node.ELEMENT_NODE) { continue; } GraphicsNode gn = isStatic ? (GraphicsNode) flowRegionNodes.get(n) : ctx.getGraphicsNode(n); Shape s = gn.getOutline(); if (s == null) { continue; } AffineTransform at = gn.getTransform(); if (at != null) { s = at.createTransformedShape(s); } regions.add(new RegionInfo(s, verticalAlign)); } }
/** * Invoked to handle an <code>Element</code> for a given * <code>BridgeContext</code>. For example, see the * <code>SVGDescElementBridge</code>. * * @param ctx the bridge context to use * @param e the element to be handled */ public void handleElement(BridgeContext ctx, Element e){ UserAgent ua = ctx.getUserAgent(); ua.handleElement(e, Boolean.TRUE); if (ctx.isDynamic()) { SVGDescriptiveElementBridge b; b = (SVGDescriptiveElementBridge)getInstance(); b.theElt = e; b.parent = (Element)e.getParentNode(); b.theCtx = ctx; ((SVGOMElement)e).setSVGContext(b); } }
/** * Invoked to handle an <code>Element</code> for a given * <code>BridgeContext</code>. For example, see the * <code>SVGDescElementBridge</code>. * * @param ctx the bridge context to use * @param e the element to be handled */ public void handleElement(BridgeContext ctx, Element e){ UserAgent ua = ctx.getUserAgent(); ua.handleElement(e, Boolean.TRUE); if (ctx.isDynamic()) { SVGDescriptiveElementBridge b; b = (SVGDescriptiveElementBridge)getInstance(); b.theElt = e; b.parent = (Element)e.getParentNode(); b.theCtx = ctx; ((SVGOMElement)e).setSVGContext(b); } }
/** * Invoked to handle an <code>Element</code> for a given * <code>BridgeContext</code>. For example, see the * <code>SVGDescElementBridge</code>. * * @param ctx the bridge context to use * @param e the element to be handled */ public void handleElement(BridgeContext ctx, Element e){ UserAgent ua = ctx.getUserAgent(); ua.handleElement(e, Boolean.TRUE); if (ctx.isDynamic()) { SVGDescriptiveElementBridge b; b = (SVGDescriptiveElementBridge)getInstance(); b.theElt = e; b.parent = (Element)e.getParentNode(); b.theCtx = ctx; ((SVGOMElement)e).setSVGContext(b); } }
/** * This method is invoked during the build phase if the document * is dynamic. The responsability of this method is to ensure that * any dynamic modifications of the element this bridge is * dedicated to, happen on its associated GVT product. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { if (!ctx.isInteractive()) return; // Bind the nodes for interactive and dynamic // HACK due to the way images are represented in GVT ctx.bind(e, node); if (ctx.isDynamic()) { // Only do this for dynamic not interactive. this.e = e; this.node = node; this.ctx = ctx; ((SVGOMElement)e).setSVGContext(this); } }
/** * This method is invoked during the build phase if the document * is dynamic. The responsability of this method is to ensure that * any dynamic modifications of the element this bridge is * dedicated to, happen on its associated GVT product. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { if (!ctx.isInteractive()) return; // Bind the nodes for interactive and dynamic // HACK due to the way images are represented in GVT ctx.bind(e, node); if (ctx.isDynamic()) { // Only do this for dynamic not interactive. this.e = e; this.node = node; this.ctx = ctx; ((SVGOMElement)e).setSVGContext(this); } }
/** * This method is invoked during the build phase if the document * is dynamic. The responsability of this method is to ensure that * any dynamic modifications of the element this bridge is * dedicated to, happen on its associated GVT product. */ protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node) { if (!ctx.isInteractive()) return; // Bind the nodes for interactive and dynamic // HACK due to the way images are represented in GVT ctx.bind(e, node); if (ctx.isDynamic()) { // Only do this for dynamic not interactive. this.e = e; this.node = node; this.ctx = ctx; ((SVGOMElement)e).setSVGContext(this); } }
/** * Handles this animation element. * * @param ctx the bridge context to use * @param e the element being handled */ public void handleElement(BridgeContext ctx, Element e) { if (ctx.isDynamic() && BridgeContext.getSVGContext(e) == null) { SVGAnimationElementBridge b = (SVGAnimationElementBridge) getInstance(); b.element = (SVGOMElement) e; b.ctx = ctx; b.eng = ctx.getAnimationEngine(); b.element.setSVGContext(b); if (b.eng.hasStarted()) { b.initializeAnimation(); b.initializeTimedElement(); } else { b.eng.addInitialBridge(b); } } }