예제 #1
0
  /**
   * Callback to handle showing edge details for the active cytoscape edge.
   *
   * @see NetworkDetailsListener#onSelectEvent(cytoscape.data.SelectEvent)
   * @param kn the {@link KAMNetwork kam network} containing the edge
   * @param edge the {@link CyEdge cytoscape edge} that is active
   */
  public void showEdgeDetails(final KAMNetwork kn, final CyEdge edge) {
    final KamEdge kamEdge = kn.getKAMEdge(edge);

    final List<BelStatement> statements = kamService.getSupportingEvidence(kamEdge);

    // set edge details and show results panel
    stmtTableModel.setStatements(statements);

    // show edge details panel
    int edgeTabIdx = resultsPanel.indexOfComponent(edgeDetailPanel);
    resultsPanel.setSelectedIndex(edgeTabIdx);
    edgeDetailPanel.setVisible(true);
  }
예제 #2
0
  /**
   * Callback to handle showing node details for the active cytoscape node.
   *
   * @see NetworkDetailsListener#onSelectEvent(cytoscape.data.SelectEvent)
   * @param kn the {@link KAMNetwork kam network} containing the node
   * @param node the {@link CyNode cytoscape node} that is active
   */
  public void showNodeDetails(final KAMNetwork kn, final CyNode node) {
    final KamNode kamNode = kn.getKAMNode(node);
    if (kamNode == null) {
      // node is not kam backed
      return;
    }

    final List<BelTerm> terms = kamService.getSupportingTerms(kamNode);

    // set node details and show results panel
    termTableModel.setTerms(terms);

    // show node details panel
    int nodeTabIdx = resultsPanel.indexOfComponent(nodeDetailPanel);
    resultsPanel.setSelectedIndex(nodeTabIdx);
    nodeDetailPanel.setVisible(true);
  }