Package jmri.util.swing
Class JTreeUtil
- java.lang.Object
-
- jmri.util.swing.GuiUtilBase
-
- jmri.util.swing.JTreeUtil
-
public class JTreeUtil extends GuiUtilBase
Common utility methods for working with JTrees.Chief among these is the loadTree method, for creating a tree from an XML definition
- Since:
- 2.9.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.util.swing.GuiUtilBase
GuiUtilBase.CallingAbstractAction
-
-
Constructor Summary
Constructors Constructor Description JTreeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.swing.tree.DefaultMutableTreeNodeloadTree(java.lang.String name, WindowInterface wi, java.lang.Object context)(package private) static javax.swing.tree.DefaultMutableTreeNodetreeFromElement(org.jdom2.Element main, WindowInterface wi, java.lang.Object context)-
Methods inherited from class jmri.util.swing.GuiUtilBase
actionFromNode, createActionInCallingWindow, createEmptyMenuItem, rootFromName, setParameters
-
-
-
-
Constructor Detail
-
JTreeUtil
public JTreeUtil()
-
-
Method Detail
-
loadTree
public static javax.swing.tree.DefaultMutableTreeNode loadTree(java.lang.String name, WindowInterface wi, java.lang.Object context)
- Parameters:
name- XML file to be read and processedwi- WindowInterface to be passed to the nodes in the treecontext- Blind context Object passed to the nodes in the tree- Returns:
- a mutable tree node
-
treeFromElement
static javax.swing.tree.DefaultMutableTreeNode treeFromElement(org.jdom2.Element main, WindowInterface wi, java.lang.Object context)
- Parameters:
main- Element to be processedwi- WindowInterface to be passed to the nodes in the treecontext- Blind context Object passed to the nodes in the tree- Returns:
- a mutable tree node
-
-