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