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.mxDiagramChangeListenerNested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxCodecprotected mxGraphModelprotected booleanWhether remote changes should be significant in the local command history.Fields inherited from class com.mxgraph.sharing.mxSharedState
delta, diagramChangeListeners, stateFields 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 TypeMethodDescriptionvoidvoidcellRemoved(Object cell) Adds removed cells to the codec object lookup for references to the removed cells after this point in time.protected mxUndoableEditCreates 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.booleanprotected StringprocessEdit(Node node) voidsetSignificantRemoteChanges(boolean significantRemoteChanges) Methods inherited from class com.mxgraph.sharing.mxSharedState
addDiagramChangeListener, getDelta, processDelta, removeDiagramChangeListener, resetDeltaMethods 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:
getStatein classmxSharedState
-
addDelta
- Overrides:
addDeltain classmxSharedState
-
processEdit
- Overrides:
processEditin 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.
-