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,
This commit is contained in:
parent
274e1736be
commit
e5454d3720
1 changed files with 17 additions and 19 deletions
|
@ -61,8 +61,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
String response, dictType;
|
String response, dictType;
|
||||||
this.pocketpc = pocketpc;
|
this.pocketpc = pocketpc;
|
||||||
|
|
||||||
if (!pocketpc) response = ThdlOptions.getStringOption(defOpenOption);
|
response = ThdlOptions.getStringOption(defOpenOption);
|
||||||
else response=null;
|
|
||||||
|
|
||||||
if (response==null || response.equals(""))
|
if (response==null || response.equals(""))
|
||||||
{
|
{
|
||||||
|
@ -78,7 +77,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
{
|
{
|
||||||
dictType = wdf.getDictionaryType();
|
dictType = wdf.getDictionaryType();
|
||||||
mainWindow.setTitle("Tibetan Translation Tool: Connected to " + dictType + " database");
|
mainWindow.setTitle("Tibetan Translation Tool: Connected to " + dictType + " database");
|
||||||
if (!pocketpc && wdf.getDefaultOption())
|
if (wdf.getDefaultOption())
|
||||||
{
|
{
|
||||||
ThdlOptions.setUserPreference(defOpenOption, response);
|
ThdlOptions.setUserPreference(defOpenOption, response);
|
||||||
ThdlOptions.setUserPreference(dictOpenType, dictType);
|
ThdlOptions.setUserPreference(dictOpenType, dictType);
|
||||||
|
@ -119,7 +118,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
if (mainWindow==null)
|
if (mainWindow==null)
|
||||||
{
|
{
|
||||||
String dictType=null;
|
String dictType=null;
|
||||||
if (!pocketpc) dictType = ThdlOptions.getStringOption(dictOpenType);
|
dictType = ThdlOptions.getStringOption(dictOpenType);
|
||||||
if (dictType!=null && !dictType.equals(""))
|
if (dictType!=null && !dictType.equals(""))
|
||||||
mainWindow = new Frame("Tibetan Translation Tool: Connected to " + dictType + " database");
|
mainWindow = new Frame("Tibetan Translation Tool: Connected to " + dictType + " database");
|
||||||
else
|
else
|
||||||
|
@ -238,12 +237,12 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
mainWindow.toFront();
|
mainWindow.toFront();
|
||||||
|
|
||||||
if (pocketpc || !ThdlOptions.getBooleanOption(AboutDialog.windowAboutOption))
|
if (!ThdlOptions.getBooleanOption(AboutDialog.windowAboutOption))
|
||||||
{
|
{
|
||||||
diagAbout = new AboutDialog(mainWindow, pocketpc);
|
diagAbout = new AboutDialog(mainWindow, pocketpc);
|
||||||
diagAbout.show();
|
diagAbout.show();
|
||||||
|
|
||||||
if (!pocketpc && diagAbout.omitNextTime())
|
if (diagAbout.omitNextTime())
|
||||||
{
|
{
|
||||||
ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, true);
|
ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, true);
|
||||||
try
|
try
|
||||||
|
@ -262,7 +261,9 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
switch(args.length)
|
switch(args.length)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
new WindowScannerFilter();
|
if (System.getProperty("os.name").toLowerCase().equals("windows ce"))
|
||||||
|
new WindowScannerFilter(true);
|
||||||
|
else new WindowScannerFilter();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (args[0].length()>0 && args[0].charAt(0)=='-') new WindowScannerFilter(true);
|
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);
|
if (diagAbout==null) diagAbout = new AboutDialog(mainWindow, pocketpc);
|
||||||
diagAbout.show();
|
diagAbout.show();
|
||||||
if (!pocketpc)
|
ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, diagAbout.omitNextTime());
|
||||||
{
|
try
|
||||||
ThdlOptions.setUserPreference(AboutDialog.windowAboutOption, diagAbout.omitNextTime());
|
{
|
||||||
try
|
ThdlOptions.saveUserPreferences();
|
||||||
{
|
}
|
||||||
ThdlOptions.saveUserPreferences();
|
catch(Exception e)
|
||||||
}
|
{
|
||||||
catch(Exception e)
|
}
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (clicked == mnuClear)
|
else if (clicked == mnuClear)
|
||||||
{
|
{
|
||||||
|
@ -435,7 +433,7 @@ public class WindowScannerFilter implements WindowListener, FocusListener, Actio
|
||||||
{
|
{
|
||||||
mainWindow.setVisible(false);
|
mainWindow.setVisible(false);
|
||||||
mainWindow.dispose();
|
mainWindow.dispose();
|
||||||
if (!pocketpc) ThdlOptions.setUserPreference(defOpenOption, "");
|
ThdlOptions.setUserPreference(defOpenOption, "");
|
||||||
new WindowScannerFilter(pocketpc);
|
new WindowScannerFilter(pocketpc);
|
||||||
}
|
}
|
||||||
else if (clicked == mnuExit)
|
else if (clicked == mnuExit)
|
||||||
|
|
Loading…
Reference in a new issue