Example #1
0
  /**
   * Returns the JGraph port cell that corresponds to the specified JGraphT vertex. If no
   * corresponding port found, returns <code>null</code>.
   *
   * @param jGraphTVertex a JGraphT vertex of the JGraphT graph.
   * @return the JGraph port cell that corresponds to the specified JGraphT vertex, or <code>null
   *     </code> if no corresponding cell found.
   */
  public DefaultPort getVertexPort(Object jGraphTVertex) {
    DefaultGraphCell vertexCell = getVertexCell(jGraphTVertex);

    if (vertexCell == null) {
      return null;
    } else {
      return (DefaultPort) vertexCell.getChildAt(0);
    }
  }