| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.sharing.mxSharedDiagram
public class mxSharedDiagram
Implements a diagram that may be shared among multiple sessions.
| Nested Class Summary | |
|---|---|
| static interface | mxSharedDiagram.mxDiagramChangeListenerDefines the requirements for an object that listens to changes on the shared diagram. | 
| Field Summary | |
|---|---|
| protected  List<mxSharedDiagram.mxDiagramChangeListener> | diagramChangeListenersHolds a list of diagram change listeners. | 
| protected  StringBuffer | historyHolds the history of all changes of initial state. | 
| protected  String | initialStateHolds the initial state of the diagram. | 
| Constructor Summary | |
|---|---|
| mxSharedDiagram(String initialState)Constructs a new diagram with the given initial state. | |
| Method Summary | |
|---|---|
|  void | addDiagramChangeListener(mxSharedDiagram.mxDiagramChangeListener listener)Adds the given listener to the list of diagram change listeners. | 
|  void | clearHistory()Clears the history of all changes. | 
|  void | dispatch(Object sender,
         String xml)Appends the given string to the history and dispatches the change to all sessions that are listening to this shared diagram. | 
|  String | getDelta()Returns the history of all changes as a string. | 
|  String | getInitialState()Returns the initial state of the diagram. | 
|  void | removeDiagramChangeListener(mxSharedDiagram.mxDiagramChangeListener listener)Removes the given listener from the list of diagram change listeners. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected List<mxSharedDiagram.mxDiagramChangeListener> diagramChangeListeners
protected String initialState
protected StringBuffer history
| Constructor Detail | 
|---|
public mxSharedDiagram(String initialState)
initialState - Initial state of the diagram.| Method Detail | 
|---|
public String getInitialState()
public void clearHistory()
public String getDelta()
public void dispatch(Object sender,
                     String xml)
sender - Session where the change originated from.xml - XML string that represents the change.public void addDiagramChangeListener(mxSharedDiagram.mxDiagramChangeListener listener)
listener - Diagram change listener to be added.public void removeDiagramChangeListener(mxSharedDiagram.mxDiagramChangeListener listener)
listener - Diagram change listener to be removed.| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||