src/main/java/com/mxgraph/io/mxCodec.java
public void insertIntoGraph(mxICell cell)
	{
		mxICell parent = cell.getParent();
		mxICell source = cell.getTerminal(true);
		mxICell target = cell.getTerminal(false);

		// Fixes possible inconsistencies during insert into graph
		cell.setTerminal(null, false);
		cell.setTerminal(null, true);
		cell.setParent(null);
		
		if (parent != null)
		{
			parent.insert(cell);
		}

		if (source != null)
		{
			source.insertEdge(cell, true);
		}

		if (target != null)
		{
			target.insertEdge(cell, false);
		}
	}
/**
	 * Inserts the given cell into its parent and terminal cells.
	 */
Inserts the given cell into its parent and terminal cells.
Inserts the given cell into its parent and terminal cells .
public void insertIntoGraph(mxICell cell)
	{
		mxICell parent = cell.getParent();
		mxICell source = cell.getTerminal(true);
		mxICell target = cell.getTerminal(false);
		cell.setTerminal(null, false);
		cell.setTerminal(null, true);
		cell.setParent(null);
		if (parent != null)
		{
			parent.insert(cell);
		}
		if (source != null)
		{
			source.insertEdge(cell, true);
		}
		if (target != null)
		{
			target.insertEdge(cell, false);
		}
	}
public void insertIntoGraph ( mxICell cell ) { mxICell parent = cell . getParent ( ) ; mxICell source = cell . getTerminal ( true ) ; mxICell target = cell . getTerminal ( false ) ; cell . setTerminal ( null , false ) ; cell . setTerminal ( null , true ) ; cell . setParent ( null ) ; if ( parent != null ) { parent . insert ( cell ) ; } if ( source != null ) { source . insertEdge ( cell , true ) ; } if ( target != null ) { target . insertEdge ( cell , false ) ; } }
Inserts the given cell into its parent and terminal cells.
Inserts the given cell into its parent and terminal cells .
// Fixes possible inconsistencies during insert into graph