public class TreeUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
TreeUtil.Visitor |
Constructor and Description |
---|
TreeUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(javax.swing.tree.TreeModel model,
java.lang.Object node) |
static javax.swing.tree.TreeCellRenderer |
createSimpleTreeCellRenderer(javax.swing.ImageIcon icon) |
static javax.swing.tree.TreeCellRenderer |
createSimpleTreeCellRenderer(java.lang.String text,
javax.swing.ImageIcon icon,
java.awt.Font font) |
static javax.swing.event.TreeModelEvent |
createTreeModelEvent(java.lang.Object source,
java.lang.Object node,
javax.swing.tree.TreeModel model) |
static java.lang.String |
dump(javax.swing.tree.TreeModel model) |
static void |
expand(javax.swing.JTree tree,
javax.swing.tree.TreePath path,
Block expandNodeCondition) |
static void |
expandAll(javax.swing.JTree tree,
javax.swing.tree.TreePath path) |
static javax.swing.tree.TreePath |
findTreePath(java.lang.Object node,
javax.swing.tree.TreeModel model) |
static java.util.List |
lastPathComponents(javax.swing.tree.TreePath[] paths) |
static java.util.Collection |
nodes(javax.swing.tree.TreePath path,
javax.swing.tree.TreeModel model) |
static void |
visit(javax.swing.tree.TreeModel model,
javax.swing.tree.TreePath path,
TreeUtil.Visitor visitor)
Visit the path and all subpaths.
|
static void |
visit(javax.swing.tree.TreeModel model,
TreeUtil.Visitor visitor) |
public static javax.swing.tree.TreeCellRenderer createSimpleTreeCellRenderer(javax.swing.ImageIcon icon)
public static javax.swing.tree.TreeCellRenderer createSimpleTreeCellRenderer(java.lang.String text, javax.swing.ImageIcon icon, java.awt.Font font)
text
- null to get the text by calling #toString on the valuepublic static void visit(javax.swing.tree.TreeModel model, TreeUtil.Visitor visitor)
public static void visit(javax.swing.tree.TreeModel model, javax.swing.tree.TreePath path, TreeUtil.Visitor visitor)
public static javax.swing.event.TreeModelEvent createTreeModelEvent(java.lang.Object source, java.lang.Object node, javax.swing.tree.TreeModel model)
public static java.lang.String dump(javax.swing.tree.TreeModel model)
public static javax.swing.tree.TreePath findTreePath(java.lang.Object node, javax.swing.tree.TreeModel model)
public static boolean contains(javax.swing.tree.TreeModel model, java.lang.Object node)
public static java.util.List lastPathComponents(javax.swing.tree.TreePath[] paths)
public static void expandAll(javax.swing.JTree tree, javax.swing.tree.TreePath path)
public static void expand(javax.swing.JTree tree, javax.swing.tree.TreePath path, Block expandNodeCondition)
public static java.util.Collection nodes(javax.swing.tree.TreePath path, javax.swing.tree.TreeModel model)