no message
This commit is contained in:
@@ -36,29 +36,20 @@ public class SapforTasksPackageTree extends DataTree {
|
||||
public void selectSamePath_r(TreePath example, int index, DefaultMutableTreeNode node, Vector<DefaultMutableTreeNode> res) {
|
||||
if (index < example.getPathCount()) {
|
||||
DefaultMutableTreeNode exampleNode = (DefaultMutableTreeNode) example.getPathComponent(index);
|
||||
// System.out.println("index = "+index);
|
||||
// System.out.println("example node="+exampleNode.toString());
|
||||
// System.out.println("node-"+node.toString());
|
||||
// System.out.println("");
|
||||
if (exampleNode.toString().equals(node.toString())) {
|
||||
res.add(node);
|
||||
// System.out.println("+");
|
||||
for (int i = 0; i < node.getChildCount(); ++i)
|
||||
selectSamePath_r(example, index+1, (DefaultMutableTreeNode) node.getChildAt(i), res);
|
||||
selectSamePath_r(example, index + 1, (DefaultMutableTreeNode) node.getChildAt(i), res);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void selectSamePath(TreePath path_in) {
|
||||
// int i = path_in.getPath().length;
|
||||
// path_in.getPathComponent(i).toString();
|
||||
// System.out.println("e = " + path_in);
|
||||
Vector<DefaultMutableTreeNode> pathNodes = new Vector<>();
|
||||
selectSamePath_r(path_in, 0, root, pathNodes);
|
||||
// System.out.println("+");
|
||||
TreePath path = new TreePath(pathNodes.toArray());
|
||||
// System.out.println(path);
|
||||
setSelectionPath(path);
|
||||
// System.out.println("++");
|
||||
if (!pathNodes.isEmpty()) {
|
||||
TreePath path = new TreePath(pathNodes.toArray());
|
||||
setSelectionPath(path);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void SelectionAction(TreePath e) {
|
||||
|
||||
Reference in New Issue
Block a user