Package com.mxgraph.io.gd

Examples of com.mxgraph.io.gd.mxGdDocument


                  openXmlPng(editor, fc.getSelectedFile());
                }
                else if (fc.getSelectedFile().getAbsolutePath()
                    .toLowerCase().endsWith(".txt"))
                {
                  mxGdDocument document = new mxGdDocument();
                  document.parse(mxUtils.readFile(fc
                      .getSelectedFile()
                      .getAbsolutePath()));
                  openGD(editor, fc.getSelectedFile(),
                      document);
                }
                else
                {
                  Document document = mxUtils
                      .parseXml(mxUtils.readFile(fc
                          .getSelectedFile()
                          .getAbsolutePath()));

                  if (fc.getSelectedFile().getAbsolutePath()
                      .toLowerCase().endsWith(".vdx"))
                  {
                    openVdx(editor, fc.getSelectedFile(),
                        document);
                  }
                  else
                  {
                    mxCodec codec = new mxCodec(document);
                    codec.decode(
                        document.getDocumentElement(),
                        graph.getModel());
                    editor.setCurrentFile(fc
                        .getSelectedFile());
                  }
View Full Code Here


   * @return The GD document generated.
   */
  public static mxGdDocument encode(mxGraph graph)
  {
    Object parent = graph.getDefaultParent();
    mxGdDocument document = new mxGdDocument();

    //Adds Nodes and Edges.
    document = encodeNodesAndEdges(document, parent, graph, new mxPoint(0,
        0));

View Full Code Here

TOP

Related Classes of com.mxgraph.io.gd.mxGdDocument

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.