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.
This commit is contained in:
parent
5249c48807
commit
abcf8f19b3
25 changed files with 1490 additions and 1337 deletions
|
@ -23,7 +23,6 @@ import javax.swing.*;
|
|||
import javax.swing.event.*;
|
||||
import javax.swing.table.*;
|
||||
import org.thdl.tib.input.DuffPane;
|
||||
import org.thdl.tib.text.TibetanDocument;
|
||||
|
||||
/** Graphical interfase to be used by applications and applets
|
||||
to input a Tibetan text (in Roman or Tibetan script) and
|
||||
|
@ -142,7 +141,7 @@ public class DuffScannerPanel extends ScannerPanel
|
|||
|
||||
in = "";
|
||||
if (showingTibetan)
|
||||
in = ((TibetanDocument)duffInput.getDocument()).getWylie();
|
||||
in = duffInput.getWylie();
|
||||
else
|
||||
in = txtInput.getText();
|
||||
|
||||
|
@ -192,7 +191,7 @@ public class DuffScannerPanel extends ScannerPanel
|
|||
}
|
||||
if (!enabled && showingTibetan)
|
||||
{
|
||||
txtInput.setText(((TibetanDocument)duffInput.getDocument()).getWylie());
|
||||
txtInput.setText(duffInput.getWylie());
|
||||
table.activateTibetan(false);
|
||||
cl.last(inputPanel);
|
||||
showingTibetan = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue