private boolean equalNodes (Node[] arr1, Node[] arr2) { // generic tests if (!Arrays.equals (arr1, arr2)) return false; if (arr1 == null || arr1.length == 0) return true; // compare paths from each node to root int i = 0; while ( i < arr1.length && Arrays.equals ( NodeOp.createPath (arr1[i], null), NodeOp.createPath (arr2[i], null))) { i++; } return i == arr1.length; }
private boolean equalNodes (Node[] arr1, Node[] arr2) { // generic tests if (!Arrays.equals (arr1, arr2)) return false; if (arr1 == null || arr1.length == 0) return true; // compare paths from each node to root int i = 0; while ( i < arr1.length && Arrays.equals ( NodeOp.createPath (arr1[i], null), NodeOp.createPath (arr2[i], null))) { i++; } return i == arr1.length; }
private boolean equalNodes(Node[] arr1, Node[] arr2) { // generic tests if (!Arrays.equals(arr1, arr2)) { return false; } if ((arr1 == null) || (arr1.length == 0)) { return true; } // compare paths from each node to root int i = 0; while ((i < arr1.length) && Arrays.equals(NodeOp.createPath(arr1[i], null), NodeOp.createPath(arr2[i], null))) { i++; } return i == arr1.length; }
if (!Arrays.equals (NodeOp.createPath (n_remove, null), NodeOp.createPath (n_selection, null))) { it.remove ();
if (!Arrays.equals (NodeOp.createPath (n_remove, null), NodeOp.createPath (n_selection, null))) { it.remove ();
public List<String[]> getExpandedPaths() { List<String[]> result = new ArrayList<String[]>(); TreeNode rtn = Visualizer.findVisualizer(getRootContext()); TreePath tp = new TreePath(rtn); // Get the root Enumeration<TreePath> paths = tree.getExpandedDescendants(tp); if (null != paths) { while (paths.hasMoreElements()) { TreePath ep = paths.nextElement(); Node en = Visualizer.findNode(ep.getLastPathComponent()); String[] path = NodeOp.createPath(en, getRootContext()); result.add(path); } } return result; }
if (!Arrays.equals(NodeOp.createPath(n_remove, null), NodeOp.createPath(n_selection, null))) { it.remove();
explored = null; } else if (isUnderRoot(exploredContext)) { explored = NodeOp.createPath(exploredContext, rootContext); } else { explored = null; selected.add(NodeOp.createPath(selectedNodes[i], rootContext));
explored = null; else if (isUnderRoot (exploredContext)) explored = NodeOp.createPath (exploredContext, rootContext); else explored = null; for (int i = 0; i < selectedNodes.length; i++) { if (isUnderRoot (selectedNodes[i])) { selected.add (NodeOp.createPath (selectedNodes[i], rootContext));
explored = null; else if (isUnderRoot (exploredContext)) explored = NodeOp.createPath (exploredContext, rootContext); else explored = null; for (int i = 0; i < selectedNodes.length; i++) { if (isUnderRoot (selectedNodes[i])) { selected.add (NodeOp.createPath (selectedNodes[i], rootContext));
return; String[] path = NodeOp.createPath(getExplorerManager().getSelectedNodes()[0], getExplorerManager().getRootContext()); StringBuffer sb = new StringBuffer("\\"); //NOI18N for (int i = 0; i < path.length; i++){