Examples of mxCodec


Examples of com.mxgraph.io.mxCodec

      BufferedImage image = mxCellRenderer.createBufferedImage(graph,
          null, 1, bg, graphComponent.isAntiAlias(), null,
          graphComponent.getCanvas());

      // Creates the URL-encoded XML data
      mxCodec codec = new mxCodec();
      String xml = URLEncoder.encode(
          mxXmlUtils.getXml(codec.encode(graph.getModel())), "UTF-8");
      mxPngEncodeParam param = mxPngEncodeParam
          .getDefaultEncodeParam(image);
      param.setCompressedText(new String[] { "mxGraphModel", xml });

      // Saves as a PNG file
View Full Code Here

Examples of com.mxgraph.io.mxCodec

        if (value != null)
        {
          Document document = mxXmlUtils.parseXml(URLDecoder.decode(
              value, "UTF-8"));
          mxCodec codec = new mxCodec(document);
          codec.decode(document.getDocumentElement(), editor
              .getGraphComponent().getGraph().getModel());
          editor.setCurrentFile(file);
          resetEditor(editor);

          return;
View Full Code Here

Examples of com.mxgraph.io.mxCodec

                  Document document = mxXmlUtils
                      .parseXml(mxUtils.readFile(fc
                          .getSelectedFile()
                          .getAbsolutePath()));

                  mxCodec codec = new mxCodec(document);
                  codec.decode(
                      document.getDocumentElement(),
                      graph.getModel());
                  editor.setCurrentFile(fc
                      .getSelectedFile());
View Full Code Here

Examples of com.mxgraph.io.mxCodec

                BufferedImage image = mxCellRenderer.createBufferedImage(graph,
                        null, 1, Color.WHITE, graphComponent.isAntiAlias(), null,
                        graphComponent.getCanvas());

            // Creates the URL-encoded XML data
            mxCodec codec = new mxCodec();
            String xml = URLEncoder.encode(mxUtils.getXml(codec.encode(graph.getModel())), "UTF-8");
            mxPngEncodeParam param = mxPngEncodeParam.getDefaultEncodeParam(image);
            param.setCompressedText(new String[] { "mxGraphModel", xml });
            // Saves as a PNG file
            FileOutputStream outputStream = new FileOutputStream(new File(graphFileNameOut));
            try {
View Full Code Here

Examples of com.mxgraph.io.mxCodec

      {
        // Handles the special case were no ids should be
        // resolved in the existing model. This change will
        // replace all registered ids and cells from the
        // model and insert a new cell hierarchy instead.
        mxCodec tmp = new mxCodec(node.getOwnerDocument());
        change = tmp.decode(node);
      }
      else
      {
        change = codec.decode(node);
      }
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.