From e5454d3720eb09be75e4a88893bc30268cbe37c8 Mon Sep 17 00:00:00 2001 From: amontano Date: Sat, 7 Feb 2004 18:21:17 +0000 Subject: [PATCH] Updated the translation tool to conform to the Personal Profile specification of Java. Before it would run in pocket pc's through the more restricted personalJava specification but Sun's vm for pocket pc's project was terminated. Now it is designed to run under IBM's VM for pocket pc's called J9 which implements the Personal Profile specification. Such specification also supports awt, but not swing so still there is no (hope for) support of Tibetan script in the pocket pc's, --- .../thdl/tib/scanner/WindowScannerFilter.java | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/source/org/thdl/tib/scanner/WindowScannerFilter.java b/source/org/thdl/tib/scanner/WindowScannerFilter.java index c3d13b0..b7ff1b7 100644 --- a/source/org/thdl/tib/scanner/WindowScannerFilter.java +++ b/source/org/thdl/tib/scanner/WindowScannerFilter.java @@ -61,8 +61,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio String response, dictType; this.pocketpc = pocketpc; - if (!pocketpc) response = ThdlOptions.getStringOption(defOpenOption); - else response=null; + response = ThdlOptions.getStringOption(defOpenOption); if (response==null || response.equals("")) { @@ -78,7 +77,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio { dictType = wdf.getDictionaryType(); mainWindow.setTitle("Tibetan Translation Tool: Connected to " + dictType + " database"); - if (!pocketpc && wdf.getDefaultOption()) + if (wdf.getDefaultOption()) { ThdlOptions.setUserPreference(defOpenOption, response); ThdlOptions.setUserPreference(dictOpenType, dictType); @@ -119,7 +118,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio if (mainWindow==null) { String dictType=null; - if (!pocketpc) dictType = ThdlOptions.getStringOption(dictOpenType); + dictType = ThdlOptions.getStringOption(dictOpenType); if (dictType!=null && !dictType.equals("")) mainWindow = new Frame("Tibetan Translation Tool: Connected to " + dictType + " database"); else @@ -238,12 +237,12 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio mainWindow.show(); mainWindow.toFront(); - if (pocketpc || !ThdlOptions.getBooleanOption(AboutDialog.windowAboutOption)) + if (!ThdlOptions.getBooleanOption(AboutDialog.windowAboutOption)) { diagAbout = new AboutDialog(mainWindow, pocketpc); diagAbout.show(); - if (!pocketpc && diagAbout.omitNextTime()) + if (diagAbout.omitNextTime()) { ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, true); try @@ -262,7 +261,9 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio switch(args.length) { case 0: - new WindowScannerFilter(); + if (System.getProperty("os.name").toLowerCase().equals("windows ce")) + new WindowScannerFilter(true); + else new WindowScannerFilter(); break; case 1: if (args[0].length()>0 && args[0].charAt(0)=='-') new WindowScannerFilter(true); @@ -415,17 +416,14 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio { if (diagAbout==null) diagAbout = new AboutDialog(mainWindow, pocketpc); diagAbout.show(); - if (!pocketpc) - { - ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, diagAbout.omitNextTime()); - try - { - ThdlOptions.saveUserPreferences(); - } - catch(Exception e) - { - } - } + ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, diagAbout.omitNextTime()); + try + { + ThdlOptions.saveUserPreferences(); + } + catch(Exception e) + { + } } else if (clicked == mnuClear) { @@ -435,7 +433,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio { mainWindow.setVisible(false); mainWindow.dispose(); - if (!pocketpc) ThdlOptions.setUserPreference(defOpenOption, ""); + ThdlOptions.setUserPreference(defOpenOption, ""); new WindowScannerFilter(pocketpc); } else if (clicked == mnuExit)