Added a "Help" menu item that pulls up jskad_doc.html, which is now put

into Jskad's JAR file.

Doing so required that I cut out a lot of fancy HTML code.  The correct fix
is to use XML to store the meat and then use XSL to generate two forms of
HTML: one dumb enough for Java, one for use on the THDL tools website.
This commit is contained in:
dchandler 2003-02-01 06:42:07 +00:00
parent cf279bb620
commit e6a10d052f
2 changed files with 71 additions and 256 deletions

View file

@ -10,7 +10,7 @@ License for the specific terms governing rights and limitations under the
License. License.
The Initial Developer of this software is the Tibetan and Himalayan Digital The Initial Developer of this software is the Tibetan and Himalayan Digital
Library (THDL). Portions created by the THDL are Copyright 2001 THDL. Library (THDL). Portions created by the THDL are Copyright 2001-2003 THDL.
All Rights Reserved. All Rights Reserved.
Contributor(s): ______________________________________. Contributor(s): ______________________________________.
@ -39,7 +39,7 @@ import org.thdl.util.ThdlOptions;
import org.thdl.util.ThdlVersion; import org.thdl.util.ThdlVersion;
import org.thdl.util.StatusBar; import org.thdl.util.StatusBar;
import org.thdl.util.ThdlActionListener; import org.thdl.util.ThdlActionListener;
import org.thdl.util.RTFPane; import org.thdl.util.HTMLPane;
import org.thdl.util.SimpleFrame; import org.thdl.util.SimpleFrame;
import org.thdl.util.ThdlLazyException; import org.thdl.util.ThdlLazyException;
@ -124,6 +124,8 @@ public class Jskad extends JPanel implements DocumentListener {
} }
} }
/** pane displaying Jskad's single HTML help file */
private static HTMLPane helpPane;
/** /**
* @param parent the object that embeds this instance of Jskad. * @param parent the object that embeds this instance of Jskad.
@ -327,23 +329,35 @@ public class Jskad extends JPanel implements DocumentListener {
JMenu infoMenu = new JMenu("Info"); JMenu infoMenu = new JMenu("Info");
JMenuItem aboutItem = new JMenuItem("About"); {
aboutItem.addActionListener(new ThdlActionListener() { JMenuItem helpItem = new JMenuItem("Help");
public void theRealActionPerformed(ActionEvent e) { helpItem.addActionListener(new ThdlActionListener() {
JOptionPane.showMessageDialog(Jskad.this, public void theRealActionPerformed(ActionEvent e) {
"Copyright 2001-2002 Tibetan and Himalayan Digital Library\n\n"+ if (helpPane == null) {
"Jskad is protected by the THDL Open Community License.\n\n"+ /* FIXME HARD-CODED VERSION NUMBER */ try {
helpPane
"For more information, or to download the source code\n"+ = new HTMLPane(Jskad.class,
"for Jskad, visit our web site:\n"+ "/org/thdl/tib/input/jskad_doc.html");
" http://www.thdl.org/\n" + } catch (Exception ex) {
"\n" + ex.printStackTrace(System.err);
"When submitting bug reports, please indicate that the\n" + throw new ThdlLazyException(ex);
"time of compilation is " /* DLC FIXME--handle this better.
+ ThdlVersion.getTimeOfCompilation() + "\n", show a dialog saying "help can't be
"About Jskad", JOptionPane.PLAIN_MESSAGE); loaded, surf to thdl's web site and
} also submit a bug report." */
}); }
}
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();
}
for (int i = 0; i < keybdMgr.size(); i++) { for (int i = 0; i < keybdMgr.size(); i++) {
final JskadKeyboard kbd = keybdMgr.elementAt(i); final JskadKeyboard kbd = keybdMgr.elementAt(i);
@ -353,6 +367,12 @@ public class Jskad extends JPanel implements DocumentListener {
public void theRealActionPerformed(ActionEvent e) { public void theRealActionPerformed(ActionEvent e) {
new SimpleFrame(kbd.getIdentifyingString(), new SimpleFrame(kbd.getIdentifyingString(),
kbd.getQuickRefPane()); kbd.getQuickRefPane());
/* DLC FIXME -- pressing the "Extended
Wylie" 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(keybdItem); infoMenu.add(keybdItem);
@ -361,7 +381,26 @@ public class Jskad extends JPanel implements DocumentListener {
infoMenu.addSeparator(); infoMenu.addSeparator();
infoMenu.add(aboutItem); {
JMenuItem aboutItem = new JMenuItem("About");
aboutItem.addActionListener(new ThdlActionListener() {
public void theRealActionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(Jskad.this,
"Copyright 2001-2003 Tibetan and Himalayan Digital Library\n\n"+
"Jskad is protected by the THDL Open Community License.\n\n"+ /* FIXME HARD-CODED VERSION NUMBER */
"For more information, or to download the source code\n"+
"for Jskad, visit our web site:\n"+
" http://www.thdl.org/\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);
}
menuBar.add(infoMenu); menuBar.add(infoMenu);

View file

@ -1,232 +1,16 @@
<html> <html>
<head> <head>
<title>Help on Jskad</title>
<!--
==============
INSERT KEYWORDS AND DESCRIPTION HERE
==============
-->
<meta name="keywords" content="tibetan literature, tibetan genres, tibetan religious texts">
<meta name="description" content="This presents analyses, catalogs, and digital representations of all genres of Tibetan literature.">
<!--
==============
INSERT PAGE TITLE HERE
==============
In order to facilitate the use of the unicode character set the charset declaration will be set equal to utf-8
Always incorporate Tibetan and Himalayan
-->
<title>Tibetan & Himalayan Tools Collections</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-utf-8">
<!--
==============
THIS IS THE STYLE FOR THE BODY; IT'S WHAT CALLS ON THE BANNER AS A BACKGROUND IMAGE AND SETS UP THE BACKGROUND COLOR. MAKE SURE TO LINK TO THE BANNER HERE.
==============
-->
<style type="text/css">
<!--
body {background-attachment: scroll; background-image: url(/tibet/images/bannerTools.gif); background-repeat: no-repeat; background-position: left top; backgroud-color: white}
-->
</style>
<!--
==============
THE STYLE FOR THE TEXT, ETC. IT GOES TO THE TOP-LEVEL STYLE PAGE. IS THERE A NEED FOR EACH COLLECTION TO HAVE INDIVIDUAL STYLE PAGES?
==============
-->
<link rel="stylesheet" href="/tibet/style/tools.css">
<!--
==============
MAKES NETSCAPE RELOAD IF THE WINDOW IS RESIZED
==============
-->
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head> </head>
<!--
==============
SETS THE PAGE MARGINS TO "0" SO THE MENU DOESN'T GET SCREWED UP
==============
-->
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<!--
==============
THE JAVASCRIPT MENUS
==============
-->
<script type='text/javascript'>
//HV Menu v5- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}
//==============
// --CALL UP THE MENU. THE 1ST OF THE CHOICES HAS THE VARIABLES
// AND NEEDS TO BE UPDATED FOR EACH SECTION.
// MENU_LOADER.JS WILL ALWAYS BE THE SAME.
//==============
</script>
<script type='text/javascript' src='/tibet/scripts/menu_tools.js'></script>
<script type='text/javascript' src='/tibet/scripts/menu_loader.js'></script>
<script type="text/javascript" src="/tibet/scripts/thdl_scripts.js"></script>
<noscript> Your browser does not support Javascript menus. Please utilize the
Site Map for navigation.</noscript>
<div align="left" style="position:absolute; left:0px; top:0px; width:100px; height:50px; z-index:7">
<a href="/tibet/index.html">
<img src="/tibet/images/spacer.gif" style="border-width:0" width="100" height="50">
</a>
</div>
<div id="Layer1" style="position:absolute; left:100px; top:28px; width:708px; height:20px; z-index:1">
<!--
==============
INSERT THE BREADCRUMBS
==============
A HREF tags should not be applied to current page, e.g. THDL and Collections get link, Literature and Home do not. If you were on a subpage of Literature, then Literature would link to the Literature home page.
-->
<div align="right"><font color="#000000"><A HREF="/tibet/index.html">THDL</A> : <A HREF="/tibet/tools/index.html">Tools</A> :
<a href="/tibet/tools/software.html">Software</a> : <a href="/tibet/tools/input.html">Tibetan Input</a> :
<a href="/tibet/tools/jskad.html">Jskad</a> : Documentation</font>
</div>
</div>
<!--
==============
INSERT THE MENU
==============
-->
<div id='MenuPos' style="text-size:9px; layer-background-color:#CCCCCC; background-color: #CCCCCC; position:absolute; left:0px; top:50px; width:808px"><table width="808" cellpadding="0" cellspacing="0" height=19"><tr><td><p style="font-size:9px">Menu loading...</p></td></tr></table></div>
<!--
==============
MAKE THE LAYER THAT WILL HOLD THE CONTENT OF THE PAGE - THE TEXT, IMAGES, WHATEVER. THIS LAYER WILL BE CLOSED AT THE END OF THIS HTML DOCUMENT
==============
Maximum table width not to exceed 750
All images must have borders of 1 pixel
No image will exceed 325 X 325 height and width measurements
Position attribute on layer3 may need to be changed to absolute to accomodate Netscape
-->
<div id="Layer3" style="position:relative; left:7px; top:80px; width:801px; height:396px; z-index:1; overflow: visible; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000" >
<table width="750" border="0" cellspacing="0" cellpadding="10">
<tr>
<td valign="top" align="left">
<!--
=============
FOR EVERY "ADMINISTRATIVELY DISTINCT" PROJECT, THERE SHOULD BE A CREDIT FOR THE PROVIDER OF THE INFO
=============
-->
<script langauge="JavaScript">
function openWin(url, name) { popupWin = window.open(url, name,"resizable=1,scrollbars=1,toolbar=0,width=400 ,height=450")
}
</script>
<!--
<p class="credits">
Hosting Institution: University of Virginia<br>
</p>
<!--
============
THIS LINK WILL OPEN A SEPARATE WINDOW THAT WILL PROVIDE INFORMATION REGARDING THE ADVISORY BOARD MEMBERS. ALSO PROVIDED IN THE PAGE WILL BE PARTICIPATION AND DONATION INFORMATION.
============
-->
<!--
==============
SETS THE BODY TEXT TO JUSTIFIED
==============
-->
<div align=justify>
<!--
==============
INSERT UPPER RIGHT IMAGE HERE -- MAKE SURE TO ADD AN ALT TAG!
REMEMBER...
All images must have borders of 1 pixel
No image will exceed 325 X 325 height and width measurements
==============
-->
<!--
<table align=right border="0" cellpadding="5" cellspacing="1" width="0">
<tr>
<td>
<p align="justify"><img src="/tibet/images/tools/worker.gif" width="200" height="250" border="1" align="middle" /></p>
</td>
</tr>
<tr>
<td>
<!--
==============
INSERT CAPTION HERE
==============
-->
<!--
<p class="caption">Tibetan construction worker (Derge).</p>
<!--
=============
INSERT LINK TO GUIDED TOUR HERE -uncomment when ready.
=============
-->
<!--
<p class="caption">click here for <a href="blank.html">Guided Tour</a></p>
//-->
<!--
</td>
</tr>
</table>
<!--
==============
INSERT BODY TEXT HERE
The first section of text is the short "introduction" about the Theme and the various discplines that have a vested interest in them.
Design principle: Bold the first few words of this text section.
I guess David wants the name of the author of this section and date created (revised). I suppose it lives above the bolded first words???
==============
-->
<h2>Jskad Documentation</h2> <h2>Jskad Documentation</h2>
<!-- DLC FIXMEDOC - Andres's e-mail says to me that copy-and-paste to
MS Word should be mentioned, and installing fonts should be explained
(they're in the jar, but with MS Word you need them). -->
<ul> <ul>
<li><a href="#install">Running Jskad</a></li> <li><a href="#install">Running Jskad</a></li>
<li><a href="#start">Getting Started</a></li> <li><a href="#start">Getting Started</a></li>
@ -380,9 +164,9 @@ Sections (c)-(e) are structured in exactly the same way. A line consists of a va
Although the three additional keyboards included in this installation always define only one keystroke per character/vowel, it is possible to define a keyboard in which multiple keystrokes correspond to single characters/vowels, as in the Extended Wylie keyboard. However, punctuation is only ever allowed to correspond to a single keystroke. Although the three additional keyboards included in this installation always define only one keystroke per character/vowel, it is possible to define a keyboard in which multiple keystrokes correspond to single characters/vowels, as in the Extended Wylie keyboard. However, punctuation is only ever allowed to correspond to a single keystroke.
Below is a sample (partial) keyboard, with key parts explained, and much omitted: Below is a sample (partial) keyboard, with key parts explained, and much omitted:
<p> <p>
Sambhota keyboard //Everything before &lt?parameters?> is taken to be a comment. Sambhota keyboard //Everything before &lt?parameters?&gt; is taken to be a comment.
<p> <p>
&lt?parameters?> //describes the logic of the keyboard &lt?parameters?&gt; //describes the logic of the keyboard
<br>has sanskrit stacking=true //is there a stack key for sanskrit stacks? <br>has sanskrit stacking=true //is there a stack key for sanskrit stacks?
<br>has tibetan stacking=true //is there a stack key for tibetan stacks? <br>has tibetan stacking=true //is there a stack key for tibetan stacks?
<br>is stacking medial=false //is the stack key medial, ie like '+' in g+y, or not, as in +gy <br>is stacking medial=false //is the stack key medial, ie like '+' in g+y, or not, as in +gy
@ -393,21 +177,21 @@ Sambhota keyboard //Everything before &lt?parameters?> is taken to be a comment.
<br>has 'a' vowel=false //is there a dummy 'a' vowel? <br>has 'a' vowel=false //is there a dummy 'a' vowel?
<br>is achung consonant=true //can achung take part in consonantal stacks? <br>is achung consonant=true //can achung take part in consonantal stacks?
<p> <p>
&lt?characters?> //characters include consonants and numerals &lt?characters?&gt; //characters include consonants and numerals
<br>k=k <br>k=k
<br>kh=K //left value is Extended Wylie & right is equivalent in Sambhota <br>kh=K //left value is Extended Wylie &amp; right is equivalent in Sambhota
<br>g=g <br>g=g
<br>ng=G <br>ng=G
<br>f= //no equivalent of 'f' in Sambhota <br>f= //no equivalent of 'f' in Sambhota
<p> <p>
&lt?vowels?> &lt?vowels?&gt;
<br>a=a <br>a=a
<br>i=i <br>i=i
<br>u=u <br>u=u
<br>e=e <br>e=e
<br>o=o <br>o=o
<p> <p>
&lt?punctuation?> &lt?punctuation?&gt;
<br> = //read as [Space] = [Space] <br> = //read as [Space] = [Space]
<br>/=, <br>/=,
</p> </p>
@ -434,15 +218,7 @@ Some common problems:
</ul> </ul>
<p> <p>
If all else fails, remove Java and Jskad from your computer, and then reinstall both. 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> </p>
</div>
</td>
</tr>
</table>
</div>
</body> </body>
</html> </html>