//Insert new edge and set constraints.
edge = (mxCell) graph.insertEdge(parent, null, textLabel, source,
target, style);
graph.setConnectionConstraint(edge, source, true,
new mxConnectionConstraint(fromConstraint, false));
graph.setConnectionConstraint(edge, target, false,
new mxConnectionConstraint(toConstraint, false));
//Gets and sets routing points of the edge.
mxGeometry edgeGeometry = edge.getGeometry();
List<mxPoint> pointList = edgeShape.getRoutingPoints(parentHeight);
edgeGeometry.setPoints(pointList);