*/
public static void showHelpWindow(HelpId id) throws HelpSetException
{
- if (Platform.isJS())
- {
- try
- {
- BrowserLauncher.openURL(HELP_PAGE_ROOT + id.getPath());
- } catch (IOException e) {}
- return;
- }
-
- ClassLoader cl = Desktop.class.getClassLoader();
- URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$
- HelpSet hs = new HelpSet(cl, url);
-
- if (hb == null)
+ if (Platform.isJS())
{
- /*
- * create help broker first time (only)
- */
- hb = hs.createHelpBroker();
+ try
+ {
+ BrowserLauncher.openURL(HELP_PAGE_ROOT + id.getPath());
+ } catch (IOException e)
+ {
+ }
}
-
- try
- {
- hb.setCurrentID(id.getId());
- } catch (BadIDException bad)
+ else
+ /**
+ * Java only
+ *
+ * @j2sNative
+ */
{
- System.out.println("Bad help link: " + id.getId()
- + ": must match a target in help.jhm");
- throw bad;
- }
- /*
- * set Help visible - at its current location if it is already shown,
- * else at a location as determined by the window manager
- */
- Point p = hb.getLocation();
- hb.setLocation(p);
- hb.setDisplayed(true);
+ ClassLoader cl = Desktop.class.getClassLoader();
+ URL url = HelpSet.findHelpSet(cl, "help/help"); // $NON-NLS-$
+ HelpSet hs = new HelpSet(cl, url);
+
+ if (hb == null)
+ {
+ /*
+ * create help broker first time (only)
+ */
+ hb = hs.createHelpBroker();
+ }
+
+ try
+ {
+ hb.setCurrentID(id.getId());
+ } catch (BadIDException bad)
+ {
+ System.out.println("Bad help link: " + id.getId()
+ + ": must match a target in help.jhm");
+ throw bad;
+ }
+
+ /*
+ * set Help visible - at its current location if it is already shown,
+ * else at a location as determined by the window manager
+ */
+ Point p = hb.getLocation();
+ hb.setLocation(p);
+ hb.setDisplayed(true);
+ }
}
/**