Package com.mxgraph.canvas

Examples of com.mxgraph.canvas.mxSvgCanvas


          String ext = filename
              .substring(filename.lastIndexOf('.') + 1);

          if (ext.equalsIgnoreCase("svg"))
          {
            mxSvgCanvas canvas = (mxSvgCanvas) mxCellRenderer
                .drawCells(graph, null, 1, null,
                    new CanvasFactory()
                    {
                      public mxICanvas createCanvas(
                          int width, int height)
                      {
                        mxSvgCanvas canvas = new mxSvgCanvas(
                            mxUtils.createSvgDocument(
                                width, height));
                        canvas.setEmbedded(true);

                        return canvas;
                      }

                    });

            mxUtils.writeFile(mxUtils.getXml(canvas.getDocument()),
                filename);
          }
          else if (selectedFilter == vmlFileFilter)
          {
            mxUtils.writeFile(mxUtils.getXml(mxCellRenderer
View Full Code Here


          String ext = filename
              .substring(filename.lastIndexOf('.') + 1);

          if (ext.equalsIgnoreCase("svg"))
          {
            mxSvgCanvas canvas = (mxSvgCanvas) mxCellRenderer
                .drawCells(graph, null, 1, null,
                    new CanvasFactory()
                    {
                      public mxICanvas createCanvas(
                          int width, int height)
                      {
                        mxSvgCanvas canvas = new mxSvgCanvas(
                            mxDomUtils.createSvgDocument(
                                width, height));
                        canvas.setEmbedded(true);

                        return canvas;
                      }

                    });

            mxUtils.writeFile(mxXmlUtils.getXml(canvas.getDocument()),
                filename);
          }
          else if (selectedFilter == vmlFileFilter)
          {
            mxUtils.writeFile(mxXmlUtils.getXml(mxCellRenderer
View Full Code Here

   *
   */
  public static Document createSvgDocument(mxGraph graph, Object[] cells,
      double scale, Color background, mxRectangle clip)
  {
    mxSvgCanvas canvas = (mxSvgCanvas) drawCells(graph, cells, scale, clip,
        new CanvasFactory()
        {
          public mxICanvas createCanvas(int width, int height)
          {
            return new mxSvgCanvas(mxDomUtils.createSvgDocument(width,
                height));
          }

        });

    return canvas.getDocument();
  }
View Full Code Here

   *
   */
  public static Document createSvgDocument(mxGraph graph, Object[] cells,
      double scale, Color background, mxRectangle clip)
  {
    mxSvgCanvas canvas = (mxSvgCanvas) drawCells(graph, cells, scale, clip,
        new CanvasFactory()
        {
          public mxICanvas createCanvas(int width, int height)
          {
            return new mxSvgCanvas(mxUtils.createSvgDocument(width,
                height));
          }

        });

    return canvas.getDocument();
  }
View Full Code Here

TOP

Related Classes of com.mxgraph.canvas.mxSvgCanvas

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.