com.mxgraph.model

## Class mxGraphModel.mxRootChange

- java.lang.Object
- - com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange
  - - com.mxgraph.model.mxGraphModel.mxRootChange

- All Implemented Interfaces:
    mxUndoableEdit.mxUndoableChange
  Enclosing class:
    mxGraphModel

      public static class mxGraphModel.mxRootChange
      extends mxIGraphModel.mxAtomicGraphModelChange

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.Object` | `previous` Holds the new and previous root cell.
    `protected java.lang.Object` | `root` Holds the new and previous root cell.

    - ### Fields inherited from class com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange

      `model`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `mxGraphModel.mxRootChange()`
    `mxGraphModel.mxRootChange(mxGraphModel model, java.lang.Object root)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()` Changes the root of the model.
    `java.lang.Object` | `getPrevious()`
    `java.lang.Object` | `getRoot()`
    `void` | `setPrevious(java.lang.Object value)`
    `void` | `setRoot(java.lang.Object value)`

    - ### Methods inherited from class com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange

      `getModel, setModel`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### root

          protected java.lang.Object root

      Holds the new and previous root cell.

    - #### previous

          protected java.lang.Object previous

      Holds the new and previous root cell.

  - ### Constructor Detail

    - #### mxGraphModel.mxRootChange

          public mxGraphModel.mxRootChange()

    - #### mxGraphModel.mxRootChange

          public mxGraphModel.mxRootChange(mxGraphModel model,
                                   java.lang.Object root)

  - ### Method Detail

    - #### setRoot

          public void setRoot(java.lang.Object value)

    - #### getRoot

          public java.lang.Object getRoot()

      Returns:
        the root

    - #### setPrevious

          public void setPrevious(java.lang.Object value)

    - #### getPrevious

          public java.lang.Object getPrevious()

      Returns:
        the previous

    - #### execute

          public void execute()

      Changes the root of the model.
      Specified by:
        `execute` in interface `mxUndoableEdit.mxUndoableChange`
      Specified by:
        `execute` in class `mxIGraphModel.mxAtomicGraphModelChange`

Copyright (c) 2010 Gaudenz Alder. All rights reserved.