Package elki.gui.util

Class ClassTree

  • public final class ClassTree
    extends java.lang.Object
    Build a tree of available classes for use in Swing UIs.
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ClassTree.ClassNode
      Tree node representing a single class.
      static class  ClassTree.PackageNode
      Tree node representing a single class.
    • Constructor Summary

      Modifier Constructor Description
      private ClassTree()
      Private constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.swing.tree.TreeNode build​(java.util.List<java.lang.Class<?>> choices, java.lang.String rootpkg)
      Build the class tree for a given set of choices.
      private static javax.swing.tree.MutableTreeNode simplifyTree​(javax.swing.tree.MutableTreeNode cur, java.lang.String prefix)
      Simplify the tree.
      • Methods inherited from class java.lang.Object

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

      • ClassTree

        private ClassTree()
        Private constructor. Static methods only.
    • Method Detail

      • build

        public static javax.swing.tree.TreeNode build​(java.util.List<java.lang.Class<?>> choices,
                                                      java.lang.String rootpkg)
        Build the class tree for a given set of choices.
        choices - Class choices
        rootpkg - Root package name (to strip / hide)
        Root node.
      • simplifyTree

        private static javax.swing.tree.MutableTreeNode simplifyTree​(javax.swing.tree.MutableTreeNode cur,
                                                                     java.lang.String prefix)
        Simplify the tree.
        cur - Current node
        prefix - Prefix to add
        Replacement node