コード例 #1
0
  /**
   * Adds the specified JGraphT edge to be reflected by this graph model. To be called only for
   * edges that already exist in the JGraphT graph.
   *
   * @param jtEdge a JGraphT edge to be reflected by this graph model.
   */
  void handleJGraphTAddedEdge(E jtEdge) {
    DefaultEdge edgeCell = cellFactory.createEdgeCell(jtEdge);
    edgeToCell.put(jtEdge, edgeCell);
    cellToEdge.put(edgeCell, jtEdge);

    ConnectionSet cs = new ConnectionSet();
    cs.connect(
        edgeCell,
        getVertexPort(jtGraph.getEdgeSource(jtEdge)),
        getVertexPort(jtGraph.getEdgeTarget(jtEdge)));

    internalInsertCell(edgeCell, createEdgeAttributeMap(edgeCell), cs);
  }