Class GuiUtilBase

java.lang.Object
jmri.util.swing.GuiUtilBase
Direct Known Subclasses:
JMenuUtil, JToolBarUtil, JTreeUtil

public class GuiUtilBase extends Object
Common utility methods for working with GUI items
  • Constructor Details

  • Method Details

    • actionFromNode

      static Action actionFromNode(org.jdom2.Element child, WindowInterface wi, Object context)
    • createActionInCallingWindow

      static Action createActionInCallingWindow(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.
      Parameters:
      obj - the object to create an action for
      args - arguments to passed remoteCalls method of obj
      name - name of the action
      icon - icon for the action
      Returns:
      the action for obj or an empty action with name and icon
    • createEmptyMenuItem

      static Action createEmptyMenuItem(Icon icon, String name)
    • setParameters

      static void setParameters(JmriAbstractAction act, HashMap<String,String> parameters)
    • rootFromName

      protected static org.jdom2.Element rootFromName(String name)
      Get root element from XML file, handling errors locally.
      Parameters:
      name - the name of the XML file
      Returns:
      the root element or null