title: How do I change the edge style between an mxCell and mxPoint in mxgraph?
body: <p>I am trying to draw an edge with specific edge style, other than the default one. The problem is that I am drawing an edge between a cell and a point so that the edge appears as if coming from a cell to space in the graph.</p>
  
  <pre><code>edge = graph.insertEdge(parentCell, null, label, myCell,null);
  </code></pre>
  
  <p>I get exception:</p>
  
  <pre><code>"java.lang.ClassCastException: com.mxgraph.util.mxPoint cannot be cast to com.mxgraph.model.mxICell"
  </code></pre>
  
  <p>when I use this code:</p>
  
  <pre><code>mxGeometry geoCell = myCell.getGeometry();
  mxPoint termPoint = new mxPoint(geoCell.getX() - (120 - (offset)), geoCell.getY() + 100);
  graph.insertEdge(parentCell, null, "", myCell, termPoint, "edgeStyle=elbowEdgeStyle;elbow=horizontal;orthogonal=0;");
  </code></pre>
  
  <p>I am using JGraphX 1.10. Is there something I can replace the point with that wouldn't error and give the appearance of the edge connecting to space?</p>