Class mxSharedGraphModel


public class mxSharedGraphModel extends mxSharedState
Implements a diagram that may be shared among multiple sessions.
  • Field Details

    • model

      protected mxGraphModel model
    • codec

      protected mxCodec codec
    • significantRemoteChanges

      protected boolean significantRemoteChanges
      Whether remote changes should be significant in the local command history. Default is true.
  • Constructor Details

    • mxSharedGraphModel

      public mxSharedGraphModel(mxGraphModel model)
      Constructs a new diagram with the given model.
      Parameters:
      model - Initial model of the diagram.
  • Method Details

    • getModel

      public mxGraphModel getModel()
      Returns:
      the model
    • isSignificantRemoteChanges

      public boolean isSignificantRemoteChanges()
      Returns:
      the significantRemoteChanges
    • setSignificantRemoteChanges

      public void setSignificantRemoteChanges(boolean significantRemoteChanges)
      Parameters:
      significantRemoteChanges - the significantRemoteChanges to set
    • getState

      public String getState()
      Returns the initial state of the diagram.
      Overrides:
      getState in class mxSharedState
    • addDelta

      public void addDelta(String edits)
      Overrides:
      addDelta in class mxSharedState
    • processEdit

      protected String processEdit(Node node)
      Overrides:
      processEdit in class mxSharedState
    • createUndoableEdit

      protected mxUndoableEdit createUndoableEdit(mxIGraphModel.mxAtomicGraphModelChange[] changes)
      Creates a new mxUndoableEdit that implements the notify function to fire a change and notify event via the model.
    • decodeChanges

      protected mxIGraphModel.mxAtomicGraphModelChange[] decodeChanges(Node node)
      Adds removed cells to the codec object lookup for references to the removed cells after this point in time.
    • cellRemoved

      public void cellRemoved(Object cell)
      Adds removed cells to the codec object lookup for references to the removed cells after this point in time.