Package com.mxgraph.sharing
Class mxSharedGraphModel
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.sharing.mxSharedState
com.mxgraph.sharing.mxSharedGraphModel
Implements a diagram that may be shared among multiple sessions.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mxgraph.sharing.mxSharedState
mxSharedState.mxDiagramChangeListener
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxCodec
protected mxGraphModel
protected boolean
Whether remote changes should be significant in the local command history.Fields inherited from class com.mxgraph.sharing.mxSharedState
delta, diagramChangeListeners, state
Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
Constructor Summary
ConstructorsConstructorDescriptionmxSharedGraphModel
(mxGraphModel model) Constructs a new diagram with the given model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
cellRemoved
(Object cell) Adds removed cells to the codec object lookup for references to the removed cells after this point in time.protected mxUndoableEdit
Creates a new mxUndoableEdit that implements the notify function to fire a change and notify event via the model.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.getModel()
getState()
Returns the initial state of the diagram.boolean
protected String
processEdit
(Node node) void
setSignificantRemoteChanges
(boolean significantRemoteChanges) Methods inherited from class com.mxgraph.sharing.mxSharedState
addDiagramChangeListener, getDelta, processDelta, removeDiagramChangeListener, resetDelta
Methods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Field Details
-
model
-
codec
-
significantRemoteChanges
protected boolean significantRemoteChangesWhether remote changes should be significant in the local command history. Default is true.
-
-
Constructor Details
-
mxSharedGraphModel
Constructs a new diagram with the given model.- Parameters:
model
- Initial model of the diagram.
-
-
Method Details
-
getModel
- Returns:
- the model
-
isSignificantRemoteChanges
public boolean isSignificantRemoteChanges()- Returns:
- the significantRemoteChanges
-
setSignificantRemoteChanges
public void setSignificantRemoteChanges(boolean significantRemoteChanges) - Parameters:
significantRemoteChanges
- the significantRemoteChanges to set
-
getState
Returns the initial state of the diagram.- Overrides:
getState
in classmxSharedState
-
addDelta
- Overrides:
addDelta
in classmxSharedState
-
processEdit
- Overrides:
processEdit
in classmxSharedState
-
createUndoableEdit
Creates a new mxUndoableEdit that implements the notify function to fire a change and notify event via the model. -
decodeChanges
Adds removed cells to the codec object lookup for references to the removed cells after this point in time. -
cellRemoved
Adds removed cells to the codec object lookup for references to the removed cells after this point in time.
-