private void selectConnectingEdges(List<DisplayNode> displayNodes){
  if (!isAllowNodeEdgeSelection()) {
    return;
  }
  Component[] components=getComponents();
  for (  Component comp : components) {
    if (comp instanceof IDisplayEdge) {
      IDisplayEdge graphEdge=(IDisplayEdge)comp;
      DisplayNode node1=graphEdge.getComp1();
      DisplayNode node2=graphEdge.getComp2();
      if (node1 instanceof GraphNodeError) {
        continue;
      }
      if (node2 instanceof GraphNodeError) {
        continue;
      }
      if (node2 != null) {
        boolean selected=displayNodes.contains(node1) && displayNodes.contains(node2);
        graphEdge.setSelected(selected);
      }
    }
  }
}

private void selectConnectingEdges ( List < DisplayNode > displayNodes ) { if ( ! isAllowNodeEdgeSelection ( ) ) { return ; } Component [ ] components = getComponents ( ) ; for ( Component comp : components ) { if ( comp instanceof IDisplayEdge ) { IDisplayEdge graphEdge = ( IDisplayEdge ) comp ; DisplayNode node1 = graphEdge . getComp1 ( ) ; DisplayNode node2 = graphEdge . getComp2 ( ) ; if ( node1 instanceof GraphNodeError ) { continue ; } if ( node2 instanceof GraphNodeError ) { continue ; } if ( node2 != null ) { boolean selected = displayNodes . contains ( node1 ) && displayNodes . contains ( node2 ) ; graphEdge . setSelected ( selected ) ; } } } }
selects all and only those edges that are connecting selected nodes . should be called after every time the node selection is changed .
