Commit graph

85 commits

Author SHA1 Message Date
dchandler
5ffb813019 Jskad's "About" dialog box now lists the time of compilation. Ant
creates source/org/thdl/util/ThdlVersion.java when you execute the
jskad-compile target.
2002-11-16 19:18:44 +00:00
eg3p
c9349f6846 These files are not used. 2002-11-12 16:47:02 +00:00
dchandler
04da61688d A DuffPane is now a TibetanPane. A TibetanPane is much more lightweight
but does line breaks correctly.  I.e., I refactored DuffPane into two classes.

I did this trying to track down a subtle bug in line breaking: 'gye ' breaks
after 'gy' sometimes, with the dreng bo on the next line, but only when you
resize the window certain ways, and only in Savant (and maybe QD and the
translation tool, I don't know) but not in Jskad.

I was not successful in finding the bug, but it still exists when I use
TibetanPanes instead of DuffPanes in org.thdl.savant.tib.*.
2002-11-08 04:05:06 +00:00
dchandler
86e384352b Jskad's "Do you want to save your changes before you quit?" dialog is now
optional.
2002-11-08 03:58:35 +00:00
dchandler
22141248e7 Terribly minor cleanup. 2002-11-03 17:05:44 +00:00
dchandler
7adfddfb43 Fixed my fix to the "Jskad freezes on impossible input" bug.
Typing 'lKU' in Extended Wylie is now equivalent to 'lU'.  I'm not sure if
this is a change or not.
2002-11-03 17:05:05 +00:00
dchandler
de6ae79959 Fixes bug 624133, "Input freezes after impossible character". Try 'shsM' in
ACIP or 'ShSm' in Extended Wylie to see the new behavior.

We use a trie to store valid input sequences.  In the future, we could use
the same trie as a replacement for the more inefficient HashSets we use to
store characters, vowels, and punctuation.  For example, we'd use
'validInputSequences.put("K", new Pair("consonant", "k"))' when reading
in the ACIP keyboard's description of the first consonant of the Tibetan
alphabet in 'TibetanKeyboard.java'.

Note that the current trie implementation is only useful for 7- or 8-bit
transcription systems, and works best for tries with low average depth, which
describes a transcription system's trie very well.  If you used arbitrary
Unicode in your keyboard, you'd need a different trie implementation.

Improved the optional keyboard input mode status messages.
2002-11-02 18:44:24 +00:00
dchandler
a6cc4a7ff3 Removed/commented out/tagged some unused local variables.
Added a JUnit test for the new Trie that fails at present since the Trie is
case-insensitive.  Running JUnit tests is not something our build system
knows about at present, but Eclipse 2.0 makes it very easy.

Fixed a few compiler errors due to imports I'd forgotten.
2002-11-02 16:01:40 +00:00
dchandler
29042638e2 In the ACIP keyboard, 'KEE' and 'KOO', which are equivalent to Wylie's
'kai' and 'kau', now work.

The optional status messages have been improved.
2002-11-02 05:21:12 +00:00
dchandler
abcf8f19b3 Factored TibetanDocument into two classes, one that is a
DefaultStyledDocument, and another consisting entirely of static utility
methods for processing Tibetan text.  Moved TibetanDocument.DuffData
into its own class.

I think this makes things a bit more transparent, and gets us a little closer to
making clean use of Swing.
2002-11-02 03:38:59 +00:00
dchandler
1ecbfe6a7c Fixed some Javadoc comments in preparation for putting up new Javadocs
on http://thdltools.sf.net/.
2002-10-28 04:49:24 +00:00
dchandler
0ad135f8f1 This may well be a fix to the "Improper line wrapping" bug. The fix
is basically that we use our own special ViewFactory, with a new
subclass of LabelView (the view RTFEditorKit uses for the nitty
gritty) that is aware of Tibetan.

There are a couple of nasty hacks still here, and Swing's
documentation for doing what I did was quite poor.  I searched the web
for hours, read the Javadocs and the tutorials, and consulted a Swing
reference book, but I still don't have tremendous confidence in this
solution.  If it fundamentally doesn't work, though, we have to define
our own first-class Document, Element hierarchy, ViewFactory, Views,
and EditorKit.  So let's hope it *does* work fundamentally.

I can't say for sure if this even works, as I have yet to run this
code on a machine where Jskad works properly.  I had major trouble
installing the TMW fonts on Linux, and have yet to resolve it, even
after verifying via xlsfonts that the fonts were installed and then
changing TibetanMachineWeb.java to look for them.  Because I haven't
tested this yet, a lot of nasty code is tagged 'DLC' and commented
out.
2002-10-28 03:08:04 +00:00
dchandler
f26dd53da3 Changed the build so that Savant and QuillDriver's builds include
Smart*Player.java, which are accessed via reflection.  Cleaned up the
code a bit so that it would compile in so doing.

Changed the 'options.txt' preferences file to reflect the new method
of selecting media players.
2002-10-27 19:12:13 +00:00
amontano
7336d27a33 fixing the copy-paste issue for the translation tool. 2002-10-26 18:15:34 +00:00
dchandler
b6b8cd73ff Moved JskadKeyboard-related code into separate files; made many things public. 2002-10-26 17:40:51 +00:00
eg3p
27dfa66b02 Ongoing work with Andres to change paste so that
isRomanEnabled = false implies auto conversion
of Wylie to Tibetan. Doesn't work yet.
2002-10-25 19:47:14 +00:00
eg3p
91b8fd3cd9 Edited JskadKeyboard code slightly so that it is
easier to use these keyboards outside of Jskad
(for example from QuillDriver).
2002-10-25 19:41:43 +00:00
amontano
a2e8acca39 almost working but not quite 2002-10-25 17:59:27 +00:00
eg3p
d45a58e1ba Changed paste so that if (isRomanEnabled = false),
it will assume the text is Wylie and convert it to
Tibetan.
2002-10-25 17:34:30 +00:00
dchandler
f6bcc49119 Fixed a bug I introduced when I made Tibetan keyboards more modular. 2002-10-23 04:03:17 +00:00
dchandler
4eda412cb5 The enter and tab keys were causing edits regardless of setEditable(false);
this is now fixed.

Minor clean-up resulting from my aborted refactoring of the keyboard event
handling code.
2002-10-22 03:53:33 +00:00
dchandler
4c0026ab4f Removed the old installKeyboard routines. 2002-10-20 08:25:10 +00:00
dchandler
dc53ded878 Adding a new Tibetan keyboard now requires merely copying and pasting
3 lines.  Quick reference .rtf files (on the Info menu) are optional.

Added a first try at an ACIP keyboard.  At the very least, ACIP's "GHA"
is busted.
2002-10-20 08:02:16 +00:00
dchandler
0097be4266 Fixed bug 617156, "DuffPane ignores setEditable(false)".
I fixed this the easy way, by checking the value of isEditable() before
cutting, pasting, or adding typed text.  I may have missed a spot, but
checking at a lower level is a bit less efficient.

Fixing this the hard way, the keymaps-and-overridden-default-action way,
seems like it will make the code uglier, not cleaner.  And it won't get us
closer to fixing the killer bug, 614475, "Improper Line Wrapping".
2002-10-20 05:54:29 +00:00
dchandler
08e4e2fc57 Added a flexible mechanism for persistent boolean-, integer-, and
string-valued preferences built atop java.util.Properties.

How it works: the jvm is asked first, and then the user's prefs file, if it exists,
then the system-wide prefs file, and then the built-in preferences.  Finally, for
robustness, a default may be optionally hard-coded in the source.

I made several things configurable, too:

the default Tibetan keyboard
the default font sizes and faces
whether you want developer-only features enabled
Savant's file extension (.savant)
etc.

The only known problems are the following:

The default location for the user's preferences file is windows-specific,
arbitrary, and not in the user documentation.  Likewise for the location of the
system-wide preferences file.  You can change them using 'java -D', though.

There is no "Save preferences" option yet, and closing the program does
not save preferences either.
2002-10-14 04:06:05 +00:00
dchandler
b914309dba Got rid of Javadoc warnings by rephrasing things. Fixed a broken Javadoc
link.
2002-10-14 00:19:30 +00:00
dchandler
f2e1041ab9 The "Info" menu contains four new items, descriptions of each of the four
supported Tibetan keyboards.
2002-10-13 20:42:23 +00:00
dchandler
02e55d6819 There is now a status bar in Jskad unless you set a system property stating
that you don't want one.  It's on by default.

If you set another system property, every keypress in "Tibetan" input mode
causes an update to the status bar.  The messages are for developers, not
users, so this option is off by default.

Updated to use the new log file facility.
2002-10-13 19:22:56 +00:00
dchandler
3f9e23cdcd Changed many /* */ comments regarding fields to Javadoc (/** */)
comments.

Reformatted the code in processTibetan() in an attempt to understand what
it does.  I'll soon commit some code that updates a status bar with "what
Jskad is thinking" in this maze of control flow.
2002-10-13 18:40:07 +00:00
dchandler
7bf2a0e574 Changed a linked list to an array. Performance is drastically better. Try
holding down the 'f' key right after startup in the old version, and you'll see
it bog down quickly.  This will never bog down.
2002-10-13 01:07:38 +00:00
dchandler
403f21c8db Added Javadoc files overview.html and several package.html files.
Added a "Quit" option to Savant's File menu.  Factored out the Close
option in doing so.

Exceptions in many action listeners are now handled by
org.thdl.util.ThdlActionListener or org.thdl.util.ThdlAbstractAction.

Many exceptions that we used to just log now optionally cause aborts.
This option is on by default for developers using 'ant savant-run'-style
targets, but it is off for users.

An erroneous CLASSPATH now causes a useful error message in almost
all situations.

Fixed some typos and bad links in Javadoc comments.

Added a simple assertion facility, but the overhead is suffered even in
release builds.

Factored out the code that sets up log files like savant.log and jskad.log.
2002-10-06 18:23:27 +00:00
dchandler
78a76eec55 Previously, all but the last line had \r\r\n line feeds, which is neither DOS
nor MAC nor Unix nor anything else.  That last line must have been the
thing that made CVS's import choke.

Now these have correct line feeds--\r\n on DOS/Win32, \n on Unix, \r on
Mac.
2002-10-05 20:20:49 +00:00
dchandler
635b707067 Thanks to the TeeStream, standard output and standard error are now
written to, in addition to writing to the .log file.
2002-10-04 04:52:41 +00:00
dchandler
10d86fc3b7 Updated comments so that Javadoc 1.4 warnings went away. 2002-09-30 03:10:00 +00:00
dchandler
c6d6116ff2 Initial revision 2002-09-23 23:15:39 +00:00