public class mxSharedGraphModel extends mxSharedState
mxSharedState.mxDiagramChangeListener
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
protected mxCodec |
codec |
protected mxGraphModel |
model |
protected boolean |
significantRemoteChanges
Whether remote changes should be significant in the
local command history.
|
delta, diagramChangeListeners, state
eventListeners, eventsEnabled, eventSource
Constructor and Description |
---|
mxSharedGraphModel(mxGraphModel model)
Constructs a new diagram with the given model.
|
Modifier and Type | Method and Description |
---|---|
void |
addDelta(String edits) |
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 |
createUndoableEdit(mxIGraphModel.mxAtomicGraphModelChange[] changes)
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.
|
mxGraphModel |
getModel() |
String |
getState()
Returns the initial state of the diagram.
|
boolean |
isSignificantRemoteChanges() |
protected String |
processEdit(Node node) |
void |
setSignificantRemoteChanges(boolean significantRemoteChanges) |
addDiagramChangeListener, getDelta, processDelta, removeDiagramChangeListener, resetDelta
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
protected mxGraphModel model
protected mxCodec codec
protected boolean significantRemoteChanges
public mxSharedGraphModel(mxGraphModel model)
model
- Initial model of the diagram.public mxGraphModel getModel()
public boolean isSignificantRemoteChanges()
public void setSignificantRemoteChanges(boolean significantRemoteChanges)
significantRemoteChanges
- the significantRemoteChanges to setpublic String getState()
getState
in class mxSharedState
public void addDelta(String edits)
addDelta
in class mxSharedState
protected String processEdit(Node node)
processEdit
in class mxSharedState
protected mxUndoableEdit createUndoableEdit(mxIGraphModel.mxAtomicGraphModelChange[] changes)
protected mxIGraphModel.mxAtomicGraphModelChange[] decodeChanges(Node node)
public void cellRemoved(Object cell)
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.