Package jmri.util.swing
Class GuiUtilBase
java.lang.Object
jmri.util.swing.GuiUtilBase
- Direct Known Subclasses:
JMenuUtil,JToolBarUtil,JTreeUtil
Common utility methods for working with GUI items
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ActionactionFromNode(org.jdom2.Element child, WindowInterface wi, Object context) (package private) static ActioncreateActionInCallingWindow(Object obj, String[] args, String name, Icon icon) Create an action against the object that invoked the creation of the GUIBase, a string array is used so that in the future further options can be specified to be passed.(package private) static ActioncreateEmptyMenuItem(Icon icon, String name) protected static org.jdom2.ElementrootFromName(String name) Get root element from XML file, handling errors locally.(package private) static voidsetParameters(JmriAbstractAction act, HashMap<String, String> parameters)
-
Constructor Details
-
GuiUtilBase
public GuiUtilBase()
-
-
Method Details
-
actionFromNode
-
createActionInCallingWindow
Create an action against the object that invoked the creation of the GUIBase, a string array is used so that in the future further options can be specified to be passed.- Parameters:
obj- the object to create an action forargs- arguments to passed remoteCalls method of objname- name of the actionicon- icon for the action- Returns:
- the action for obj or an empty action with name and icon
-
createEmptyMenuItem
-
setParameters
-
rootFromName
Get root element from XML file, handling errors locally.- Parameters:
name- the name of the XML file- Returns:
- the root element or null
-