/** * This method is invoked during the build phase if the document * is dynamic. The responsibility 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()) { // Bind the nodes for interactive and dynamic. ctx.bind(e, node); } }
/** * This method is invoked during the build phase if the document * is dynamic. The responsibility 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()) { // Bind the nodes for interactive and dynamic. ctx.bind(e, node); } }
/** * This method is invoked during the build phase if the document * is dynamic. The responsibility 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()) { // Bind the nodes for interactive and dynamic. ctx.bind(e, node); } }
/** * 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()) { // HACK due to the way images are represented in GVT ImageNode imgNode = (ImageNode)node; ctx.bind(e, imgNode.getImage()); } }
/** * 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()) { // HACK due to the way images are represented in GVT ImageNode imgNode = (ImageNode)node; ctx.bind(e, imgNode.getImage()); } }
/** * 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()) { // HACK due to the way images are represented in GVT ImageNode imgNode = (ImageNode)node; ctx.bind(e, imgNode.getImage()); } }
/** * 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); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. * * @param ctx the bridge context to use * @param e the element that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node) { super.buildGraphicsNode(ctx, e, node); if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; EventListener l = new CursorMouseOverListener(ctx); target.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false, null); ctx.storeEventListenerNS (target, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. * * @param ctx the bridge context to use * @param e the element that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node) { super.buildGraphicsNode(ctx, e, node); if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; EventListener l = new CursorMouseOverListener(ctx); target.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false, null); ctx.storeEventListenerNS (target, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false); } }
/** * Builds using the specified BridgeContext and element, the * specified graphics node. * * @param ctx the bridge context to use * @param e the element that describes the graphics node to build * @param node the graphics node to build */ public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node) { super.buildGraphicsNode(ctx, e, node); if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; EventListener l = new CursorMouseOverListener(ctx); target.addEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false, null); ctx.storeEventListenerNS (target, XMLConstants.XML_EVENTS_NAMESPACE_URI, SVG_EVENT_MOUSEOVER, l, false); } }
/** * This function creates a new 'sub' BridgeContext to associated * with 'newDoc' if one currently doesn't exist, otherwise it * returns the BridgeContext currently associated with the * document. * @param newDoc The document to get/create a BridgeContext for. */ public BridgeContext createSubBridgeContext(SVGOMDocument newDoc) { BridgeContext subCtx; CSSEngine eng = newDoc.getCSSEngine(); if (eng != null) { subCtx = (BridgeContext) newDoc.getCSSEngine().getCSSContext(); return subCtx; } subCtx = createBridgeContext(newDoc); subCtx.primaryContext = primaryContext != null ? primaryContext : this; subCtx.primaryContext.childContexts.add(new WeakReference(subCtx)); subCtx.dynamicStatus = dynamicStatus; subCtx.setGVTBuilder(getGVTBuilder()); subCtx.setTextPainter(getTextPainter()); subCtx.setDocument(newDoc); subCtx.initializeDocument(newDoc); if (isInteractive()) subCtx.addUIEventListeners(newDoc); return subCtx; }
/** * This function creates a new 'sub' BridgeContext to associated * with 'newDoc' if one currently doesn't exist, otherwise it * returns the BridgeContext currently associated with the * document. * @param newDoc The document to get/create a BridgeContext for. */ public BridgeContext createSubBridgeContext(SVGOMDocument newDoc) { BridgeContext subCtx; CSSEngine eng = newDoc.getCSSEngine(); if (eng != null) { subCtx = (BridgeContext) newDoc.getCSSEngine().getCSSContext(); return subCtx; } subCtx = createBridgeContext(newDoc); subCtx.primaryContext = primaryContext != null ? primaryContext : this; subCtx.primaryContext.childContexts.add(new WeakReference(subCtx)); subCtx.dynamicStatus = dynamicStatus; subCtx.setGVTBuilder(getGVTBuilder()); subCtx.setTextPainter(getTextPainter()); subCtx.setDocument(newDoc); subCtx.initializeDocument(newDoc); if (isInteractive()) subCtx.addUIEventListeners(newDoc); return subCtx; }
/** * This function creates a new 'sub' BridgeContext to associated * with 'newDoc' if one currently doesn't exist, otherwise it * returns the BridgeContext currently associated with the * document. * @param newDoc The document to get/create a BridgeContext for. */ public BridgeContext createSubBridgeContext(SVGOMDocument newDoc) { BridgeContext subCtx; CSSEngine eng = newDoc.getCSSEngine(); if (eng != null) { subCtx = (BridgeContext) newDoc.getCSSEngine().getCSSContext(); return subCtx; } subCtx = createBridgeContext(newDoc); subCtx.primaryContext = primaryContext != null ? primaryContext : this; subCtx.primaryContext.childContexts.add(new WeakReference(subCtx)); subCtx.dynamicStatus = dynamicStatus; subCtx.setGVTBuilder(getGVTBuilder()); subCtx.setTextPainter(getTextPainter()); subCtx.setDocument(newDoc); subCtx.initializeDocument(newDoc); if (isInteractive()) subCtx.addUIEventListeners(newDoc); return subCtx; }
if (ctx.isInteractive()) { ctx.addUIEventListeners(document);
if (ctx.isInteractive()) { ctx.addUIEventListeners(document);
if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; CursorHolder ch = new CursorHolder(CursorManager.DEFAULT_CURSOR);
if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; CursorHolder ch = new CursorHolder(CursorManager.DEFAULT_CURSOR);
if (ctx.isInteractive()) { NodeEventTarget target = (NodeEventTarget)e; CursorHolder ch = new CursorHolder(CursorManager.DEFAULT_CURSOR);