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);
		}
	}