title: JgraphX How can you make an edge connect a vertex to another edge (instead of another vertex)?
body: <p>I want to able to use an edge to connect a vertex and <em>another edge</em> (which is connecting two other vertices). I want to change the code accordingly so that I will be able to do this connection from the user interface (just like you do for two vertices). </p>
  
  <p>To illustrate what I am after: I want to get the green square from the tip of the arrow to turn blue (just like the one at its bottom), suggesting that a connection was established.</p>
  
  <p><a href="http://i.stack.imgur.com/MYLTn.png" rel="nofollow">Screenshot of JgraphX situation</a></p>
  
  <p>I have checked the documentation and the code related to the creation of connections and valid terminals, but I could not implement the behaviour I need, which is the ability to set an edge as a valid terminal/a valid target in a connection. Any help would be greatly appreciated.</p>
  
  <p>I am not sure if this is where I should look (<strong>mxGraph.java</strong> class) when trying to make an edge a valid target/source.</p>
  
  <pre><code>public boolean isValidSource(Object cell)
  {
      return (cell == null &amp;&amp; allowDanglingEdges)
                      || (cell != null 
                             &amp;&amp; (!model.isEdge(cell) || isConnectableEdges()) &amp;&amp; isCellConnectable(cell));
  
  }
  </code></pre>
  
  <p>UPDATE: I was able to connect two edges in code, using the <strong>insertEdge</strong> method of the graph. However, I still struggle with achieving this behaviour in the user interface.</p>