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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
protected int
protected Object
protected Object
protected int
Fields inherited from class com.mxgraph.model.mxIGraphModel.mxAtomicGraphModelChange
model
-
Constructor Summary
ConstructorsConstructorDescriptionmxChildChange
(mxGraphModel model, Object parent, Object child) mxChildChange
(mxGraphModel model, Object parent, Object child, int index) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
execute()
Changes the root of the model.getChild()
protected int
getChildIndex
(Object parent, Object child) Returns the index of the given child inside the given parent.int
getIndex()
int
protected Object
getTerminal
(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
void
setIndex
(int value) void
void
setPrevious
(Object value) void
setPreviousIndex
(int value) protected void
setTerminal
(Object edge, 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
-
Field Details
-
parent
-
previous
-
child
-
index
protected int index -
previousIndex
protected int previousIndex
-
-
Constructor Details
-
mxChildChange
public mxChildChange() -
mxChildChange
-
mxChildChange
-
-
Method Details
-
setParent
-
getParent
- Returns:
- the parent
-
setPrevious
-
getPrevious
- Returns:
- the previous
-
setChild
-
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
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
Sets the source or target terminal field for the given edge without inserting an incoming or outgoing edge in the respective terminal. -
connect
-
getChildIndex
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
-