Examples of mxRootChange


Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  /**
   * Constructs a new model codec.
   */
  public mxRootChangeCodec()
  {
    this(new mxRootChange(), new String[] { "model", "previous", "root" },
        null, null);
  }
View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

   */
  public Node beforeDecode(mxCodec dec, Node node, Object into)
  {
    if (into instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) into;

      if (node.getFirstChild() != null
          && node.getFirstChild().getNodeType() == Node.ELEMENT_NODE)
      {
        // Makes sure the original node isn't modified
        node = node.cloneNode(true);

        Node tmp = node.getFirstChild();
        change.setRoot(dec.decodeCell(tmp, false));

        Node tmp2 = tmp.getNextSibling();
        tmp.getParentNode().removeChild(tmp);
        tmp = tmp2;

View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  @Override
  public Object afterDecode(mxCodec dec, Node node, Object obj)
  {
    if (obj instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) obj;
      change.setPrevious(change.getRoot());
    }

    return obj;
  }
View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  /**
   * Constructs a new model codec.
   */
  public mxRootChangeCodec()
  {
    this(new mxRootChange(), new String[] { "model", "previous", "root" },
        null, null);
  }
View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

   */
  public Node beforeDecode(mxCodec dec, Node node, Object into)
  {
    if (into instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) into;

      if (node.getFirstChild() != null
          && node.getFirstChild().getNodeType() == Node.ELEMENT_NODE)
      {
        // Makes sure the original node isn't modified
        node = node.cloneNode(true);

        Node tmp = node.getFirstChild();
        change.setRoot(dec.decodeCell(tmp, false));

        Node tmp2 = tmp.getNextSibling();
        tmp.getParentNode().removeChild(tmp);
        tmp = tmp2;

View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  @Override
  public Object afterDecode(mxCodec dec, Node node, Object obj)
  {
    if (obj instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) obj;
      change.setPrevious(change.getRoot());
    }

    return obj;
  }
View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  /**
   * Constructs a new model codec.
   */
  public mxRootChangeCodec()
  {
    this(new mxRootChange(), new String[] { "model", "previous", "root" },
        null, null);
  }
View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

   */
  public Node beforeDecode(mxCodec dec, Node node, Object into)
  {
    if (into instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) into;

      if (node.getFirstChild() != null
          && node.getFirstChild().getNodeType() == Node.ELEMENT_NODE)
      {
        // Makes sure the original node isn't modified
        node = node.cloneNode(true);

        Node tmp = node.getFirstChild();
        change.setRoot(dec.decodeCell(tmp, false));

        Node tmp2 = tmp.getNextSibling();
        tmp.getParentNode().removeChild(tmp);
        tmp = tmp2;

View Full Code Here

Examples of com.mxgraph.model.mxGraphModel.mxRootChange

  @Override
  public Object afterDecode(mxCodec dec, Node node, Object obj)
  {
    if (obj instanceof mxRootChange)
    {
      mxRootChange change = (mxRootChange) obj;
      change.setPrevious(change.getRoot());
    }

    return obj;
  }
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.