better transparent gif support

This commit is contained in:
2015-04-25 14:33:46 +02:00
parent 91fd844cc6
commit 7ec5305783
6 changed files with 87 additions and 51 deletions
+6 -8
View File
@@ -531,6 +531,12 @@ public class View {
}
private static TreePath expandTreeNode(JTree tree, List<String> pathAsStringList) {
TreePath tp = getTreePathByPathStrings(tree, pathAsStringList);
tree.expandPath(tp);
return tp;
}
public static TreePath getTreePathByPathStrings(JTree tree, List<String> pathAsStringList) {
TreeModel model = tree.getModel();
Object node = model.getRoot();
@@ -558,17 +564,9 @@ public class View {
}
TreePath tp = new TreePath(path.toArray(new Object[path.size()]));
tree.expandPath(tp);
return tp;
}
public static void selectTreeNode(JTree tree, List<String> pathAsStringList) {
TreePath tp = expandTreeNode(tree, pathAsStringList);
if (tp != null) {
tree.setSelectionPath(tp);
}
}
public static void expandTreeNodes(JTree tree, TreePath parent, boolean expand) {
expandTreeNodesRecursive(tree, parent, expand);
}