Package org.apache.batik.dom.svg

Examples of org.apache.batik.dom.svg.SVGOMDocument


            String uri = XLinkSupport.getXLinkHref(filterElement);
            if (uri.length() == 0) {
                return in; // no xlink:href found, exit
            }
            // check if there is circular dependencies
            SVGOMDocument doc = (SVGOMDocument)filterElement.getOwnerDocument();
            URL url;
            try {
                url = new URL(doc.getURLObject(), uri);
            } catch (MalformedURLException ex) {
                throw new BridgeException(filterElement,
                                          ERR_URI_MALFORMED,
                                          new Object[] {uri});
View Full Code Here


        try {
            URL baseURL = new URL(getUserAgent().getBaseURL() == null
                            ? new java.io.File("").toURL().toExternalForm()
                            : getUserAgent().getBaseURL());
            if (baseURL != null) {
                SVGOMDocument svgdoc = (SVGOMDocument)doc;
                svgdoc.setURLObject(baseURL);
                //The following line should not be called to leave FOP compatible to Batik 1.6.
                //svgdoc.setDocumentURI(baseURL.toString());
            }
        } catch (Exception e) {
            log.error("Could not set base URL for svg", e);
View Full Code Here

                        // nothing more to do at this point.
                    }

                    if (st != null) {
                        if (svgDocument != null) {
                            SVGOMDocument doc = (SVGOMDocument)svgDocument;
                            ParsedURL docPURL
                                = new ParsedURL(svgDocument.getURL());
                            ParsedURL purl = new ParsedURL(docPURL, st);
                            String fi = svgCanvas.getFragmentIdentifier();
                            fi = (fi == null) ? "" : fi;
View Full Code Here

                            button = new JRadioButtonMenuItem(title);

                            button.addActionListener
                                (new java.awt.event.ActionListener() {
                                    public void actionPerformed(ActionEvent e) {
                                        SVGOMDocument doc;
                                        doc = (SVGOMDocument)svgCanvas.getSVGDocument();
                                        doc.clearViewCSS();
                                        alternateStyleSheet = title;
                                        svgCanvas.setSVGDocument(doc);
                                    }
                                });
View Full Code Here

            String uri = XLinkSupport.getXLinkHref(paintElement);
            if (uri.length() == 0) {
                return opacity; // no xlink:href found, exit
            }

            SVGOMDocument doc = (SVGOMDocument)paintElement.getOwnerDocument();
            URL url;
            try {
                url = new URL(doc.getURLObject(), uri);
            } catch (MalformedURLException ex) {
                throw new BridgeException(paintElement,
                                          ERR_URI_MALFORMED,
                                          new Object[] {uri});
           
View Full Code Here

            if (uri.length() == 0) {
                // no xlink:href found, exit   
                return new Color(0, 0, 0, opacity);
            }

            SVGOMDocument doc = (SVGOMDocument)paintElement.getOwnerDocument();
            URL url;
            try {
                url = new URL(doc.getURLObject(), uri);
            } catch (MalformedURLException ex) {
                throw new BridgeException(paintElement,
                                          ERR_URI_MALFORMED,
                                          new Object[] {uri});
           
View Full Code Here

                    }

                    if (st != null) {
                        if (svgDocument != null) {
                            try {
                                SVGOMDocument doc = (SVGOMDocument)svgDocument;
                                URL docURL = doc.getURLObject();
                                URL url = new URL(docURL, st);
                                String fi = svgCanvas.getFragmentIdentifier();
                                fi = (fi == null) ? "" : fi;
                                if (docURL.equals(url) && t.equals(fi)) {
                                    return;
View Full Code Here

     */
    public void linkActivated(LinkActivationEvent e) {
        String s = e.getReferencedURI();
        if (svgDocument != null) {
            try {
                SVGOMDocument doc = (SVGOMDocument)svgDocument;
                URL docURL = doc.getURLObject();
                URL url = new URL(docURL, s);
                if (!url.sameFile(docURL)) {
                    return;
                }
            } catch (MalformedURLException ex) {
View Full Code Here

            String uri = XLinkSupport.getXLinkHref(filterElement);
            if (uri.length() == 0) {
                return in; // no xlink:href found, exit
            }
            // check if there is circular dependencies
            SVGOMDocument doc = (SVGOMDocument)filterElement.getOwnerDocument();
            URL url;
            try {
                url = new URL(doc.getURLObject(), uri);
            } catch (MalformedURLException ex) {
                throw new BridgeException(filterElement,
                                          ERR_URI_MALFORMED,
                                          new Object[] {uri});
View Full Code Here

                        }
                    }
                    if (s != null) {
                        if (svgDocument != null) {
                            try {
                                SVGOMDocument doc = (SVGOMDocument)svgDocument;
                                URL docURL = doc.getURLObject();
                                URL url = new URL(docURL, s);
                                String fi = svgCanvas.getFragmentIdentifier();
                                if (docURL.equals(url) && t.equals(fi)) {
                                    return;
                                }
View Full Code Here

TOP

Related Classes of org.apache.batik.dom.svg.SVGOMDocument

Copyright © 2018 www.massapicom. 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.