Class JTreeExtensions


  • public class JTreeExtensions
    extends java.lang.Object
    The class JTreeExtensions.
    • Constructor Summary

      Constructors 
      Constructor Description
      JTreeExtensions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void expandAll​(javax.swing.JTree tree, javax.swing.tree.TreePath path, boolean expand)
      Expand all nodes recursive
      static void expandNodes​(@NonNull javax.swing.JTree tree)
      Expand all nodes but non-recursive
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JTreeExtensions

        public JTreeExtensions()
    • Method Detail

      • expandAll

        public static void expandAll​(javax.swing.JTree tree,
                                     javax.swing.tree.TreePath path,
                                     boolean expand)
        Expand all nodes recursive
        Parameters:
        tree - the tree
        path - the path
        expand - the flag to expand or collapse
      • expandNodes

        public static void expandNodes​(@NonNull
                                       @NonNull javax.swing.JTree tree)
        Expand all nodes but non-recursive
        Parameters:
        tree - the tree