Examples of GVTBuilder


Examples of org.apache.batik.bridge.GVTBuilder

     */
    public void handleElementAdded(CompositeGraphicsNode gn,
                                   Node parent,
                                   Element childElt) {
        // build the graphics node
        GVTBuilder builder = ctx.getGVTBuilder();
        GraphicsNode childNode = builder.build(ctx, childElt);
        if (childNode == null) {
            return; // the added element is not a graphic element
        }
       
        // Find the index where the GraphicsNode should be added
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

            for (int i = 0; i < s; i++) {
                cgn.remove(0);
            }
        }

        GVTBuilder builder = ctx.getGVTBuilder();
        NodeList nl = contentManager.getSelectedContent(content);
        if (nl != null) {
            for (int i = 0; i < nl.getLength(); i++) {
                Node n = nl.item(i);
                if (n.getNodeType() == Node.ELEMENT_NODE) {
                    GraphicsNode gn = builder.build(ctx, (Element) n);
                    if (gn != null) {
                        cgn.add(gn);
                    }
                }
            }
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

            for (int i = 0; i < s; i++) {
                gn.remove(0);
            }
        }

        GVTBuilder builder = ctx.getGVTBuilder();

        if (shadowTree != null) {
            GraphicsNode shadowNode = builder.build(ctx, shadowTree);
            if (shadowNode != null) {
                gn.add(shadowNode);
            }
        } else {
            for (Node m = e.getFirstChild(); m != null; m = m.getNextSibling()) {
                if (m.getNodeType() == Node.ELEMENT_NODE) {
                    GraphicsNode n = builder.build(ctx, (Element) m);
                    if (n != null) {
                        gn.add(n);
                    }
                }
            }
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

     */
    protected void handleElementAdded(CompositeGraphicsNode gn,
                                      Node parent,
                                      Element childElt) {
        // build the graphics node
        GVTBuilder builder = ctx.getGVTBuilder();
        GraphicsNode childNode = builder.build(ctx, childElt);
        if (childNode == null) {
            return; // the added element is not a graphic element
        }
       
        // Find the index where the GraphicsNode should be added
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

            flowRegionNodes = new HashMap();
        } else {
            regionChangeListener = new RegionChangeListener();
        }
        CompositeGraphicsNode cgn2 = (CompositeGraphicsNode) cgn.get(0);
        GVTBuilder builder = ctx.getGVTBuilder();
        for (Node n = getFirstChild(e); n != null; n = getNextSibling(n)) {
            if (n instanceof SVGOMFlowRegionElement) {
                for (Node m = getFirstChild(n);
                        m != null;
                        m = getNextSibling(m)) {
                    if (m.getNodeType() != Node.ELEMENT_NODE) {
                        continue;
                    }
                    GraphicsNode gn = builder.build(ctx, (Element) m);
                    if (gn != null) {
                        cgn2.add(gn);
                        if (isStatic) {
                            flowRegionNodes.put(m, gn);
                        }
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

        //
        // Now that the SVG file has been loaded, build
        // a GVT Tree from it
        //
        TestUserAgent userAgent = buildUserAgent();
        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(userAgent);
        ctx.setDynamic(true);
        Exception e = null;
        try {
            builder.build(ctx, doc);
            BaseScriptingEnvironment scriptEnvironment
                = new BaseScriptingEnvironment(ctx);
            scriptEnvironment.loadScripts();
            scriptEnvironment.dispatchSVGLoadEvent();
        } catch (Exception ex){
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

        root.setAttribute("onload", "System.out.println('hello')");

        // Now that the SVG file has been loaded, build
        // a GVT Tree from it
        TestUserAgent userAgent = new TestUserAgent();
        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(userAgent);
        ctx.setDynamic(true);

        builder.build(ctx, doc);
        BaseScriptingEnvironment scriptEnvironment
            = new BaseScriptingEnvironment(ctx);
        scriptEnvironment.loadScripts();
        scriptEnvironment.dispatchSVGLoadEvent();
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

            if (isHalted()) {
                fireEvent(cancelledDispatcher, ev);
                return;
            }
            GVTBuilder builder = null;

            if (bridgeContext.isDynamic()) {
                builder = new DynamicGVTBuilder();
            } else {
                builder = new GVTBuilder();
            }
            GraphicsNode gvtRoot = builder.build(bridgeContext, svgDocument);

            if (isHalted()) {
                fireEvent(cancelledDispatcher, ev);
                return;
            }
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

            if (o != null)
                return (GraphicsNode)o;
        }
       
        try {
            GVTBuilder builder = ctx.getGVTBuilder();
            GraphicsNode gn;
            gn = builder.build(ctx, srcElems[idx]);
            srcs[idx] = new SoftReference(gn);
            return gn;
        } catch (Exception ex) { ex.printStackTrace()}

        return null;
View Full Code Here

Examples of org.apache.batik.bridge.GVTBuilder

        //
        // Now that the SVG file has been loaded, build
        // a GVT Tree from it
        //
        UserAgent userAgent = buildUserAgent();
        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(userAgent);
        ctx.setDynamic(true);

        try {
            builder.build(ctx, doc);
            BaseScriptingEnvironment scriptEnvironment
                = new BaseScriptingEnvironment(ctx);
            scriptEnvironment.loadScripts();
            scriptEnvironment.dispatchSVGLoadEvent();
        } catch (BridgeException e){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.