Package com.mxgraph.model
Class mxGraphModel.mxChildChange
- java.lang.Object
-
- com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange
-
- com.mxgraph.model.mxGraphModel.mxChildChange
-
- All Implemented Interfaces:
mxUndoableEdit.mxUndoableChange
- Enclosing class:
- mxGraphModel
public static class mxGraphModel.mxChildChange extends mxIGraphModel.mxAtomicGraphModelChange
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
child
protected int
index
protected java.lang.Object
parent
protected java.lang.Object
previous
protected int
previousIndex
-
Fields inherited from class com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange
model
-
-
Constructor Summary
Constructors Constructor Description mxChildChange()
mxChildChange(mxGraphModel model, java.lang.Object parent, java.lang.Object child)
mxChildChange(mxGraphModel model, java.lang.Object parent, java.lang.Object child, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
connect(java.lang.Object cell, boolean isConnect)
void
execute()
Changes the root of the model.java.lang.Object
getChild()
protected int
getChildIndex(java.lang.Object parent, java.lang.Object child)
Returns the index of the given child inside the given parent.int
getIndex()
java.lang.Object
getParent()
java.lang.Object
getPrevious()
int
getPreviousIndex()
protected java.lang.Object
getTerminal(java.lang.Object edge, boolean source)
Gets the source or target terminal field for the given edge even if the edge is not stored as an incoming or outgoing edge in the respective terminal.void
setChild(java.lang.Object value)
void
setIndex(int value)
void
setParent(java.lang.Object value)
void
setPrevious(java.lang.Object value)
void
setPreviousIndex(int value)
protected void
setTerminal(java.lang.Object edge, java.lang.Object terminal, boolean source)
Sets the source or target terminal field for the given edge without inserting an incoming or outgoing edge in the respective terminal.-
Methods inherited from class com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange
getModel, setModel
-
-
-
-
Constructor Detail
-
mxChildChange
public mxChildChange()
-
mxChildChange
public mxChildChange(mxGraphModel model, java.lang.Object parent, java.lang.Object child)
-
mxChildChange
public mxChildChange(mxGraphModel model, java.lang.Object parent, java.lang.Object child, int index)
-
-
Method Detail
-
setParent
public void setParent(java.lang.Object value)
-
getParent
public java.lang.Object getParent()
- Returns:
- the parent
-
setPrevious
public void setPrevious(java.lang.Object value)
-
getPrevious
public java.lang.Object getPrevious()
- Returns:
- the previous
-
setChild
public void setChild(java.lang.Object value)
-
getChild
public java.lang.Object getChild()
- Returns:
- the child
-
setIndex
public void setIndex(int value)
-
getIndex
public int getIndex()
- Returns:
- the index
-
setPreviousIndex
public void setPreviousIndex(int value)
-
getPreviousIndex
public int getPreviousIndex()
- Returns:
- the previousIndex
-
getTerminal
protected java.lang.Object getTerminal(java.lang.Object edge, boolean source)
Gets the source or target terminal field for the given edge even if the edge is not stored as an incoming or outgoing edge in the respective terminal.
-
setTerminal
protected void setTerminal(java.lang.Object edge, java.lang.Object terminal, boolean source)
Sets the source or target terminal field for the given edge without inserting an incoming or outgoing edge in the respective terminal.
-
connect
protected void connect(java.lang.Object cell, boolean isConnect)
-
getChildIndex
protected int getChildIndex(java.lang.Object parent, java.lang.Object child)
Returns the index of the given child inside the given parent.
-
execute
public void execute()
Changes the root of the model.- Specified by:
execute
in interfacemxUndoableEdit.mxUndoableChange
- Specified by:
execute
in classmxIGraphModel.mxAtomicGraphModelChange
-
-