Class TreeUtil
- java.lang.Object
-
- org.locationtech.jts.jump.workbench.ui.TreeUtil
-
public class TreeUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TreeUtil.Visitor
-
Constructor Summary
Constructors Constructor Description TreeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
contains(TreeModel model, Object node)
static TreeCellRenderer
createSimpleTreeCellRenderer(String text, ImageIcon icon, Font font)
static TreeCellRenderer
createSimpleTreeCellRenderer(ImageIcon icon)
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)
-
-
-
Method Detail
-
createSimpleTreeCellRenderer
public static TreeCellRenderer createSimpleTreeCellRenderer(ImageIcon icon)
-
createSimpleTreeCellRenderer
public static TreeCellRenderer createSimpleTreeCellRenderer(String text, ImageIcon icon, Font font)
- Parameters:
text
- null to get the text by calling #toString on the value
-
visit
public static void visit(TreeModel model, TreeUtil.Visitor visitor)
-
visit
public static void visit(TreeModel model, TreePath path, TreeUtil.Visitor visitor)
Visit the path and all subpaths.
-
createTreeModelEvent
public static TreeModelEvent createTreeModelEvent(Object source, Object node, TreeModel model)
-
findTreePath
public static TreePath findTreePath(Object node, TreeModel model)
- Returns:
- null if the node is not in the tree model
-
nodes
public static Collection nodes(TreePath path, TreeModel model)
-
-