Package jmri.util
Class HelpUtil
- java.lang.Object
-
- jmri.util.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)
-
-
-
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 toref
- context-sensitive help referencedirect
- 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
-
openWindowsFile
public static void openWindowsFile(java.io.File file) throws JmriException
- Throws:
JmriException
-
showWebPage
public static boolean showWebPage(java.lang.String ref, java.lang.String url)
-
openWebPage
public static void openWebPage(java.lang.String url) throws JmriException
- Throws:
JmriException
-
getHelpAction
public static javax.swing.Action getHelpAction(java.lang.String name, javax.swing.Icon icon, java.lang.String id)
-
-