/** * Set the highlighted state of the neighbors of a node. * @param n the node under consideration * @param state the highlighting state to apply to neighbors */ protected void setNeighborHighlight(NodeItem n, boolean state) { Iterator iter = n.edges(); while ( iter.hasNext() ) { EdgeItem eItem = (EdgeItem)iter.next(); NodeItem nItem = eItem.getAdjacentItem(n); if (eItem.isVisible() || highlightWithInvisibleEdge) { eItem.setHighlighted(state); nItem.setHighlighted(state); } } if ( activity != null ) n.getVisualization().run(activity); }