/** * Shows all edges for "nodeView" found that are part of the network associated with "view". */ public static void showEdges(final GraphView view, final NodeView nodeView) { final int[] neighbours = view.getGraphPerspective().neighborsArray(nodeView.getGraphPerspectiveIndex()); for (int n = 0; n < neighbours.length; ++n) { final int[] edges = view.getGraphPerspective().getEdgeIndicesArray(nodeView.getGraphPerspectiveIndex(), neighbours[n], true, true); for (int j = 0; j < edges.length; ++j) view.showGraphObject(view.getEdgeView(edges[j])); } }
/** * DOCUMENT ME! * * @param view DOCUMENT ME! */ public static void unHideNodesAndInterconnectingEdges(GraphView view) { if (view == null) { return; } for (Iterator i = view.getNodeViewsIterator(); i.hasNext();) { NodeView nview = (NodeView) i.next(); Node n = nview.getNode(); view.showGraphObject(nview); int[] na = view.getGraphPerspective().neighborsArray(nview.getGraphPerspectiveIndex()); for (int i2 = 0; i2 < na.length; ++i2) { int[] edges = view.getGraphPerspective() .getEdgeIndicesArray(nview.getGraphPerspectiveIndex(), na[i2], true); if (edges != null) for (int j = 0; j < edges.length; ++j) { EdgeView ev = view.getEdgeView(edges[j]); view.showGraphObject(ev); } } } view.updateView(); }
neighInx = persp.neighborsArray(nodeInx[1]); break; neighInx = persp.neighborsArray(nodeInx[4]); if ((persp.neighborsArray(nodeNotInPersp.getRootGraphIndex()) != null) || (persp.neighborsArray(Integer.MIN_VALUE) != null) || (persp.neighborsArray(Integer.MAX_VALUE) != null) || (persp.neighborsArray(0) != null) || (persp.neighborsArray(1) != null) || (persp.neighborsArray(minNodeInx - 1) != null)) throw new IllegalStateException("expected null");