Package org.apache.batik.dom.svg

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


   
    try
    {
      UserAgent userAgent = new JRUserAgent();
     
      SVGDocumentFactory documentFactory =
        new SAXSVGDocumentFactory(userAgent.getXMLParserClassName(), true);
      documentFactory.setValidating(userAgent.isXMLParserValidating());

      SVGDocument document;
      if (svgText != null)
      {
        document = documentFactory.createSVGDocument(null,
            new StringReader(svgText));
      }
      else
      {
        document = documentFactory.createSVGDocument(null,
            new ByteArrayInputStream(svgData));
      }

      BridgeContext ctx = new BridgeContext(userAgent);
      ctx.setDynamic(true);
View Full Code Here


    protected final static Cursor WAIT_CURSOR =
        new Cursor(Cursor.WAIT_CURSOR);

    public void init() {
        CSSDocumentHandler.setParserClassName("org.w3c.flute.parser.Parser");
        df = new SVGDocumentFactory(getXMLParserClassName());
        canvas = new JSVGCanvas(this);
        canvas.setPreferredSize(new Dimension(600, 400));
        getContentPane().add(canvas, BorderLayout.CENTER);
        String uri = getParameter("svg");
        try {
View Full Code Here

     * Creates a <tt>Document</tt> using the specified isource and
     * call the <tt>transcodeToStream(Document, OutputStream).
     */
    public void transcodeToStream(InputSource isource, OutputStream ostream)
            throws TranscoderException {
        SVGDocumentFactory f = new SVGDocumentFactory(getParserClassName());
        try {
            transcodeToStream(f.createDocument(isource.getSystemId(),
                                               isource), ostream);
        } catch (DOMException ex) {
            throw new TranscoderException(ex.getMessage(), ex);
        } catch (SAXException ex) {
            throw new TranscoderException(ex.getMessage(), ex);
View Full Code Here

        setTitle(resources.getString("Frame.title"));
        setSize(resources.getInteger("Frame.width"),
                resources.getInteger("Frame.height"));
        URL url = getClass().getResource(resources.getString("Frame.icon"));
        setIconImage(new ImageIcon(url).getImage());
        df = new SVGDocumentFactory(application.getXMLParserClassName());

        addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    close();
                }
View Full Code Here

TOP

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

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.