protected void insertCell(Object cell, Object parent) {
	Object mxCell = null;
	GraphModel jModel = jgraph.getModel();
	Object value = jModel.getValue(cell);

	if (jModel.isEdge(cell)) {
	    mxCell = graph.insertEdge(parent, null, value, null, null);

	    if (edges == null) {
		edges = new Hashtable<Object, Object>();
	    }

	    edges.put(cell, mxCell);
	} else if (jModel.isPort(cell)) {
	    // TODO
	} else {
	    // A vertex
	    Rectangle2D bounds = null;

	    if (facade != null) {
		bounds = facade.getBounds(cell);
	    } else {
		GraphLayoutCache cache = jgraph.getGraphLayoutCache();
		CellView cellView = cache.getMapping(cell, false);
		bounds = cellView.getBounds();
	    }

	    if (bounds != null) {
		mxCell = graph.insertVertex(parent, null, value, bounds.getX(),
			bounds.getY(), bounds.getWidth(), bounds.getHeight());
	    } else {
		mxCell = graph.insertVertex(parent, null, value, 100, 100, 80,
			30);
	    }

	    if (vertices == null) {
		vertices = new Hashtable<Object, Object>();
	    }

	    vertices.put(cell, mxCell);
	}

	// Process all the children of this cell
	int childCount = jModel.getChildCount(cell);

	if (mxCell != null) {
	    for (int i = 0; i < childCount; i++) {
		Object childCell = jModel.getChild(cell, i);

		if (cell != null) {
		    insertCell(childCell, mxCell);
		}
	    }
	}
    }