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 interfaceTreeUtil.Visitor
-
Constructor Summary
Constructors Constructor Description TreeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancontains(TreeModel model, Object node)static TreeCellRenderercreateSimpleTreeCellRenderer(String text, ImageIcon icon, Font font)static TreeCellRenderercreateSimpleTreeCellRenderer(ImageIcon icon)static TreeModelEventcreateTreeModelEvent(Object source, Object node, TreeModel model)static Stringdump(TreeModel model)static voidexpandAll(JTree tree, TreePath path)static TreePathfindTreePath(Object node, TreeModel model)static ListlastPathComponents(TreePath[] paths)static Collectionnodes(TreePath path, TreeModel model)static voidvisit(TreeModel model, TreePath path, TreeUtil.Visitor visitor)Visit the path and all subpaths.static voidvisit(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)
-
-