Renamed the Info menu Help.
Now using CalHTMLPane to surf the offline and the online help.
This commit is contained in:
parent
0643096899
commit
086f4bb6ec
3 changed files with 84 additions and 44 deletions
24
build.xml
24
build.xml
|
@ -122,7 +122,7 @@
|
|||
<!-- To easily add a jar to the CLASSPATH, just drop it into
|
||||
'extensions/drop-ins/'. -->
|
||||
<path id="entire.class.path">
|
||||
<pathelement location="${ext}/"/> <!-- for netscape.javascript -->
|
||||
<pathelement location="${ext}/"/> <!-- for netscape.javascript and calpa.html -->
|
||||
|
||||
<!-- Developers: although these JARs are not yet in CVS, you're
|
||||
responsible for finding them and putting them into
|
||||
|
@ -284,12 +284,6 @@
|
|||
<target name="jskad-compile" depends="init"
|
||||
description="compiles Jskad" >
|
||||
<mkdir dir="${jskadbin}"/>
|
||||
<antcall target="copy-tmw-fonts-to-bin-dir">
|
||||
<param name="my.bin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="copy-tm-fonts-to-bin-dir">
|
||||
<param name="my.bin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="create-timestamp-source-code"/> <!-- DLC NOW! The -run targets are mucking with this! It isn't fatal, but it should be fixed. -->
|
||||
<antcall target="our-internal-javac-task">
|
||||
<param name="mybin" value="${jskadbin}"/>
|
||||
|
@ -316,6 +310,15 @@
|
|||
<antcall target="copy-ini-files-to-bin-dir-for-jarring">
|
||||
<param name="mybin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="copy-tmw-fonts-to-bin-dir">
|
||||
<param name="my.bin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="copy-tm-fonts-to-bin-dir">
|
||||
<param name="my.bin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="copy-calhtmlpane-to-bin-dir">
|
||||
<param name="my.bin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
<antcall target="copy-license-etc-to-bin-dir-for-jarring">
|
||||
<param name="mybin" value="${jskadbin}"/>
|
||||
</antcall>
|
||||
|
@ -1253,6 +1256,13 @@ public class ThdlVersion {
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="copy-calhtmlpane-to-bin-dir"
|
||||
description="Copies the class files for CalHTMLPane to the current build's bin/ directory. The license does not require that we include CalHTMLPane's license in the JAR.">
|
||||
<copy todir="${my.bin}/calpa/html">
|
||||
<fileset dir="extensions/calpa/html"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
<!-- My TO-DO list: -->
|
||||
|
|
|
@ -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(). */
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
|
||||
|
||||
<a name="top"></a>
|
||||
<h2>Jskad Documentation</h2>
|
||||
|
||||
<ul>
|
||||
|
@ -20,7 +21,8 @@
|
|||
<li><a href="#advancedkeyboards">More on Keyboards</a></li>
|
||||
<li><a href="#preferences">Preferences</a></li>
|
||||
<li><a href="#trouble">Troubleshooting</a></li>
|
||||
<li><a href="http://iris.lib.virginia.edu/tibet/tools/jskad.html">Jskad Home Page</a></li>
|
||||
<li><a href="#thanks">Thanks</a></li>
|
||||
<li><a href="http://iris.lib.virginia.edu/tibet/tools/jskad.html">Jskad on the Web</a></li>
|
||||
</ul>
|
||||
|
||||
<a name="latest"></a>
|
||||
|
@ -28,10 +30,14 @@
|
|||
|
||||
<p>
|
||||
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.<!-- FIXME: do this correctly, not in a "Latest Changes"
|
||||
section. -->
|
||||
(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.<!-- FIXME:
|
||||
do this correctly, not in a "Latest Changes" section. -->
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<center><font size="-1"><a href="#top">Back to top</a></font></center>
|
||||
</p>
|
||||
|
||||
<a name="install"></a>
|
||||
|
@ -91,8 +97,8 @@ href="#install">installed the TibetanMachineWeb fonts</a>.
|
|||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -415,7 +422,7 @@ The following are some common problems:
|
|||
<li><b>I get garbage when I type Tibetan.</b>
|
||||
|
||||
<br>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 <a href="#install">Running Jskad</a>.
|
||||
|
||||
<p><li><b>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.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<center><font size="-1"><a href="#top">Back to top</a></font></center>
|
||||
</p>
|
||||
|
||||
<a name="thanks"></a>
|
||||
<h3>Thanks</h3>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue