Package jmri.util

Class HelpUtil


  • public class HelpUtil
    extends java.lang.Object
    Common utility methods for displaying JMRI help pages.

    This class was created to contain common Java Help information but is now changed to use a web browser instead.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  HelpUtil.MenuProvider  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addHelpToComponent​(java.awt.Component component, java.lang.String ref)  
      static java.lang.String createStubFile​(java.lang.String helpKey, java.lang.String locale)  
      static void displayHelpRef​(java.lang.String ref)  
      static void enableHelpOnButton​(java.awt.Component comp, java.lang.String id)  
      static javax.swing.Action getHelpAction​(java.lang.String name, javax.swing.Icon icon, java.lang.String id)  
      static javax.swing.JMenu helpMenu​(javax.swing.JMenuBar menuBar, java.lang.String ref, boolean direct)
      Append a help menu to the menu bar.
      static javax.swing.JMenu makeHelpMenu​(java.lang.String ref, boolean direct)  
      static javax.swing.JMenuItem makeHelpMenuItem​(java.lang.String ref)  
      static void openWebPage​(java.lang.String url)  
      static void openWindowsFile​(java.io.File file)  
      static boolean showWebPage​(java.lang.String ref, java.lang.String url)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • helpMenu

        public static javax.swing.JMenu helpMenu​(javax.swing.JMenuBar menuBar,
                                                 java.lang.String ref,
                                                 boolean direct)
        Append a help menu to the menu bar.
        Parameters:
        menuBar - the menu bar to add the help menu to
        ref - context-sensitive help reference
        direct - true if this call should complete the help menu by adding the general help
        Returns:
        new Help menu, in case user wants to add more items or null if unable to create the help menu
      • makeHelpMenu

        public static javax.swing.JMenu makeHelpMenu​(java.lang.String ref,
                                                     boolean direct)
      • makeHelpMenuItem

        public static javax.swing.JMenuItem makeHelpMenuItem​(java.lang.String ref)
      • addHelpToComponent

        public static void addHelpToComponent​(java.awt.Component component,
                                              java.lang.String ref)
      • enableHelpOnButton

        public static void enableHelpOnButton​(java.awt.Component comp,
                                              java.lang.String id)
      • displayHelpRef

        public static void displayHelpRef​(java.lang.String ref)
      • createStubFile

        public static java.lang.String createStubFile​(java.lang.String helpKey,
                                                      java.lang.String locale)
                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • showWebPage

        public static boolean showWebPage​(java.lang.String ref,
                                          java.lang.String url)
      • getHelpAction

        public static javax.swing.Action getHelpAction​(java.lang.String name,
                                                       javax.swing.Icon icon,
                                                       java.lang.String id)