Package net.mcreator.ui.component.util
Class TreeUtils
java.lang.Object
net.mcreator.ui.component.util.TreeUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
expandAllNodes
(JTree tree, int startingIndex, int rowCount) static void
expandDescendants
(JTree tree, TreePath path) static void
expandMatchingNodesRecursively
(JTree tree, DefaultMutableTreeNode node, Predicate<DefaultMutableTreeNode> predicate) static <T> TreePath
findPathByUserObject
(DefaultMutableTreeNode node, Predicate<T> predicate, Class<T> clazz) static List
<DefaultMutableTreeNode> getExpansionState
(JTree tree) static <T> void
selectNodeByUserObject
(JTree tree, Predicate<T> predicate, Class<T> clazz) static void
setExpansionState
(JTree tree, List<DefaultMutableTreeNode> expandedNodes)
-
Constructor Details
-
TreeUtils
public TreeUtils()
-
-
Method Details
-
getExpansionState
-
setExpansionState
-
expandAllNodes
-
expandDescendants
-
expandMatchingNodesRecursively
public static void expandMatchingNodesRecursively(JTree tree, DefaultMutableTreeNode node, Predicate<DefaultMutableTreeNode> predicate) -
selectNodeByUserObject
-
findPathByUserObject
public static <T> TreePath findPathByUserObject(DefaultMutableTreeNode node, Predicate<T> predicate, Class<T> clazz)
-