Added debug info to the servlet version.

This commit is contained in:
amontano 2005-02-27 05:48:03 +00:00
parent 9507ff3694
commit 107fcce565
8 changed files with 210 additions and 200 deletions

View file

@ -208,50 +208,50 @@ public class DuffScannerPanel extends ScannerPanel implements ItemListener
public void clear()
{
txtInput.setText("");
duffInput.setText("");
fullDef.setText("");
model.newSearch(null);
table.tableChanged(new TableModelEvent(model));
txtInput.setText("");
duffInput.setText("");
fullDef.setText("");
model.newSearch(null);
table.tableChanged(new TableModelEvent(model));
table.repaint();
}
public void translate()
{
String in;
setDicts(scanner.getDictionarySource());
String in;
setDicts(scanner.getDictionarySource());
in = "";
if (showingTibetan)
in = duffInput.getWylie(new boolean[] { false });
else
in = txtInput.getText();
in = "";
if (showingTibetan)
in = duffInput.getWylie(new boolean[] { false });
else
in = txtInput.getText();
if (!in.equals(""))
{
doingStatus("Translating...");
scanner.scanBody(in);
scanner.finishUp();
model.newSearch(scanner.getWordArray());
// printAllDefs();
scanner.clearTokens();
returnStatusToNorm();
fullDef.setText("");
/* ListSelectionModel lsm = (ListSelectionModel)table.getSelectionModel();
if (!lsm.isSelectionEmpty())
{
int selectedRow = lsm.getMinSelectionIndex();
//TableModel tm = table.getModel();
if (selectedRow<model.getRowCount())
fullDef.setText(model.getValueAt(selectedRow, 1).toString());
}*/
}
else
{
model.newSearch(null);
fullDef.setText("");
}
table.tableChanged(new TableModelEvent(model));
if (!in.equals(""))
{
doingStatus("Translating...");
scanner.scanBody(in);
scanner.finishUp();
model.newSearch(scanner.getWordArray());
//printAllDefs();
scanner.clearTokens();
returnStatusToNorm();
fullDef.setText("");
/*ListSelectionModel lsm = (ListSelectionModel)table.getSelectionModel();
if (!lsm.isSelectionEmpty())
{
int selectedRow = lsm.getMinSelectionIndex();
//TableModel tm = table.getModel();
if (selectedRow<model.getRowCount())
fullDef.setText(model.getValueAt(selectedRow, 1).toString());
}*/
}
else
{
model.newSearch(null);
fullDef.setText("");
}
table.tableChanged(new TableModelEvent(model));
table.repaint();
}