diff --git a/build.xml b/build.xml index ddc19b6..aaf44dc 100644 --- a/build.xml +++ b/build.xml @@ -122,7 +122,7 @@ - + @@ -316,6 +310,15 @@ + + + + + + + + + @@ -1253,6 +1256,13 @@ public class ThdlVersion { + + + + + + diff --git a/source/org/thdl/tib/input/Jskad.java b/source/org/thdl/tib/input/Jskad.java index 1af037f..98f3ce1 100644 --- a/source/org/thdl/tib/input/Jskad.java +++ b/source/org/thdl/tib/input/Jskad.java @@ -44,6 +44,8 @@ import org.thdl.util.HTMLPane; import org.thdl.util.SimpleFrame; import org.thdl.util.ThdlLazyException; +import calpa.html.CalHTMLPane; + /** @@ -160,9 +162,6 @@ public class Jskad extends JPanel implements DocumentListener { JOptionPane.PLAIN_MESSAGE); } - /** pane displaying Jskad's single HTML help file */ - private static HTMLPane helpPane; - /** the File menu */ private JMenu fileMenu = null; @@ -596,36 +595,44 @@ public class Jskad extends JPanel implements DocumentListener { menuBar.add(toolsMenu); - JMenu infoMenu = new JMenu("Info"); + JMenu helpMenu = new JMenu("Help"); { JMenuItem helpItem = new JMenuItem("Help"); helpItem.addActionListener(new ThdlActionListener() { public void theRealActionPerformed(ActionEvent e) { - if (helpPane == null) { - try { - helpPane - = new HTMLPane(Jskad.class, - "/org/thdl/tib/input/jskad_doc.html"); - } catch (Exception ex) { - ex.printStackTrace(System.err); - throw new ThdlLazyException(ex); - /* DLC FIXME--handle this better. - show a dialog saying "help can't be - loaded, surf to thdl's web site and - also submit a bug report." */ - } + CalHTMLPane helpPane = new CalHTMLPane(); + try { + URL helpDocumentURL + = Jskad.class.getResource("/org/thdl/tib/input/jskad_doc.html"); + + helpPane.showHTMLDocument(helpDocumentURL); + } catch (Exception ex) { + ex.printStackTrace(System.err); + throw new ThdlLazyException(ex); } new SimpleFrame("Help for Jskad", helpPane); - /* DLC FIXME -- pressing the "Help" menu item - twice causes the first pane to become dead. - We should check to see if the first pane - exists and raise it rather than creating a - second pane. */ } }); - infoMenu.add(helpItem); - infoMenu.addSeparator(); + helpMenu.add(helpItem); + } + + { + JMenuItem helpItem = new JMenuItem("Jskad on the Web"); + helpItem.addActionListener(new ThdlActionListener() { + public void theRealActionPerformed(ActionEvent e) { + CalHTMLPane onlineHelpPane = new CalHTMLPane(); + try { + onlineHelpPane.showHTMLDocument(new URL("http://iris.lib.virginia.edu/tibet/tools/jskad.html")); + } catch (Exception ex) { + ex.printStackTrace(System.err); + throw new ThdlLazyException(ex); + } + new SimpleFrame("Jskad on the Web", onlineHelpPane); + } + }); + helpMenu.add(helpItem); + helpMenu.addSeparator(); } for (int i = 0; i < keybdMgr.size(); i++) { @@ -644,11 +651,11 @@ public class Jskad extends JPanel implements DocumentListener { creating a second pane. */ } }); - infoMenu.add(keybdItem); + helpMenu.add(keybdItem); } } - infoMenu.addSeparator(); + helpMenu.addSeparator(); { JMenuItem aboutItem = new JMenuItem("About"); @@ -662,16 +669,19 @@ public class Jskad extends JPanel implements DocumentListener { "for Jskad, visit our web site:\n"+ " http://thdl.org/\n" + "\n" + + "Portions copyright Andrew Moulden. Thanks to him for\n" + // CalHTMLPane's license requires this. + "allowing us to display Help documents.\n" + + "\n" + "When submitting bug reports, please indicate that the\n" + "time of compilation is " + ThdlVersion.getTimeOfCompilation() + "\n", "About Jskad", JOptionPane.PLAIN_MESSAGE); } }); - infoMenu.add(aboutItem); + helpMenu.add(aboutItem); } - menuBar.add(infoMenu); + menuBar.add(helpMenu); /* Initialize dp before calling JskadKeyboard.activate(DuffPane) or dp.toggleLanguage(). */ diff --git a/source/org/thdl/tib/input/jskad_doc.html b/source/org/thdl/tib/input/jskad_doc.html index 85837aa..51ff223 100644 --- a/source/org/thdl/tib/input/jskad_doc.html +++ b/source/org/thdl/tib/input/jskad_doc.html @@ -5,6 +5,7 @@ +

Jskad Documentation

@@ -28,10 +30,14 @@

Jskad now supports converting Tibetan Machine to Tibetan Machine Web -and vice versa.  Try it from the Tools menu.  Be on the -lookout for formatting changes; Java's RTF support is currently -poor. +(which the menus refer to as "Tibetan") and vice +versa.  Try it from the Tools menu.  Be on the lookout for +formatting changes; Java's RTF support is currently poor. +

+ +

+

Back to top

@@ -91,8 +97,8 @@ href="#install">installed the TibetanMachineWeb fonts.

A menu bar appears at the top of the window.  If you are running Jskad as an application, you'll see four menus: File, Edit, Tools, and -Info.  If you're running Jskad as an applet, you'll only see -Edit, Tools, and Info. +Help.  If you're running Jskad as an applet, you'll only see +Edit, Tools, and Help.

@@ -278,7 +284,8 @@ ambiguity. Remember that Jskad only works with the TibetanMachineWeb family of fonts.  Therefore, it will only recognize TibetanMachineWeb as Tibetan.  Any other Tibetan fonts will be assumed to be -non-Tibetan. +non-Tibetan.  Note that you can convert TibetanMachine to +TibetanMachineWeb and then convert that to Wylie if need be.

@@ -415,7 +422,7 @@ The following are some common problems:

  • I get garbage when I type Tibetan.
    This shouldn't happen now that the fonts are bundled inside -jskad.jar.  But if it does, make sure the TibetanMachineWeb fonts +Jskad's JAR.  But if it does, make sure the TibetanMachineWeb fonts are installed.  See Running Jskad.

  • When I paste Tibetan into another application, it shows up @@ -467,5 +474,18 @@ If all else fails, remove Java and Jskad from your computer, and then reinstall both.

    +

    +

    Back to top
    +

    + + +

    Thanks

    + +

    + Portions of this software are copyright Andrew Moulden.  Our + thanks go to him.  Without his hard work, our users wouldn't be + able to browse this very document with the ease they can. +

    +