Package elki.gui.util
Class ClassTree
- java.lang.Object
-
- elki.gui.util.ClassTree
-
public final class ClassTree extends java.lang.Object
Build a tree of available classes for use in Swing UIs.- Since:
- 0.7.0
- Author:
- 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
Constructors 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.
-
-
-
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.- Parameters:
choices
- Class choicesrootpkg
- Root package name (to strip / hide)- Returns:
- Root node.
-
simplifyTree
private static javax.swing.tree.MutableTreeNode simplifyTree(javax.swing.tree.MutableTreeNode cur, java.lang.String prefix)
Simplify the tree.- Parameters:
cur
- Current nodeprefix
- Prefix to add- Returns:
- Replacement node
-
-