Commit graph

14 commits

Author SHA1 Message Date
eg3p
5bfaccded7 This class provides static methods for dealing
with THDL's internationalization issues.
2002-11-02 20:11:42 +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
b8391e923d Borrowed a trie implementation from Apache's Xalan 2.4.0. 2002-11-02 13:39:29 +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
eg3p
107b4424b4 This is a class that uses reflection to manifest as
JSpinner if JRE 1.4 is installed, otherwise as
a numeric JTextField.
2002-10-25 19:36:40 +00:00
dchandler
cfa4ba4fdb Fixed Javadoc comment. 2002-10-14 05:23:58 +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
1c946ebab1 These classes contain the code that brings up the "About" and "Help"
windows in SavantShell.  It is now cleanly factored out because Jskad
uses it too (for keyboard mapping descriptions.
2002-10-13 20:40:24 +00:00
dchandler
a2dc57313a Added a class representing a GUI element, a status bar.
Added great flexibility to the code that creates the log file.  It is property
driven at present, and the default behavior is the same as the old default
behavior, except that a message is printed to standard output telling the
user which log file is being used, and that they should include its contents
in bug reports.

You can log to the temporary directory, a directory of your choice, or (by
default) the current directory.  Edward's related feature request can now
quickly be fulfilled.
2002-10-13 19:19:47 +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
ef60ccb31b This class allows for writing a message to two streams at once, like the Unix
utility 'tee'.
2002-10-04 04:51:28 +00:00
dchandler
955c46a7eb Added an unchecked exception that I find useful for marking code that the developer thinks will not cause an exception.
Added JUnit unit tests for this new exception.
2002-09-28 14:38:59 +00:00
dchandler
bd6dc4c329 Now ignoring Emacs backup files *~ 2002-09-28 14:36:27 +00:00