From 1caba29952307e005eae662fcace54b2252b8c97 Mon Sep 17 00:00:00 2001 From: manut Date: Sun, 12 Aug 2007 11:39:18 +0000 Subject: Initial git-svn-id: svn+ssh://mecka.net/home/svn/geoc@1 58fc9717-fb00-483d-b79c-3a878c4e3be5 --- trunk/build.xml | 80 ++++ trunk/build/.timestamp | 1 + trunk/build/before-obfuscation.jar | Bin 0 -> 33109 bytes trunk/build/compiled/gui/geoc.class | Bin 0 -> 7703 bytes trunk/build/compiled/nav/locListener.class | Bin 0 -> 1009 bytes trunk/build/compiled/nav/navigate.class | Bin 0 -> 3061 bytes trunk/build/compiled/nav/processLoc.class | Bin 0 -> 2618 bytes trunk/build/compiled/nav/processState.class | Bin 0 -> 909 bytes .../microedition/lcdui/AbstractInfoScreen.class | Bin 0 -> 5943 bytes .../microedition/lcdui/SimpleTableModel.class | Bin 0 -> 4617 bytes .../microedition/lcdui/SplashScreen$1.class | Bin 0 -> 241 bytes .../microedition/lcdui/SplashScreen$Watchdog.class | Bin 0 -> 1501 bytes .../netbeans/microedition/lcdui/SplashScreen.class | Bin 0 -> 3132 bytes .../netbeans/microedition/lcdui/TableItem.class | Bin 0 -> 14621 bytes .../netbeans/microedition/lcdui/TableModel.class | Bin 0 -> 434 bytes .../microedition/lcdui/TableModelListener.class | Bin 0 -> 227 bytes .../netbeans/microedition/lcdui/WaitScreen$1.class | Bin 0 -> 675 bytes .../lcdui/WaitScreen$BackgroundExecutor$1.class | Bin 0 -> 1159 bytes .../lcdui/WaitScreen$BackgroundExecutor.class | Bin 0 -> 1786 bytes .../netbeans/microedition/lcdui/WaitScreen.class | Bin 0 -> 3918 bytes .../microedition/lcdui/laf/ColorSchema.class | Bin 0 -> 2718 bytes .../microedition/lcdui/laf/SystemColorSchema.class | Bin 0 -> 1770 bytes .../microedition/lcdui/laf/UserColorSchema.class | Bin 0 -> 2132 bytes .../microedition/util/CancellableTask.class | Bin 0 -> 262 bytes .../netbeans/microedition/util/Executable.class | Bin 0 -> 204 bytes .../microedition/util/SimpleCancellableTask.class | Bin 0 -> 1395 bytes trunk/build/manifest.mf | 6 + trunk/build/obfuscated.jar | Bin 0 -> 33109 bytes trunk/build/obfuscated/META-INF/MANIFEST.MF | 4 + trunk/build/obfuscated/gui/geoc.class | Bin 0 -> 7703 bytes trunk/build/obfuscated/nav/locListener.class | Bin 0 -> 1009 bytes trunk/build/obfuscated/nav/navigate.class | Bin 0 -> 3061 bytes trunk/build/obfuscated/nav/processLoc.class | Bin 0 -> 2618 bytes trunk/build/obfuscated/nav/processState.class | Bin 0 -> 909 bytes .../microedition/lcdui/AbstractInfoScreen.class | Bin 0 -> 5943 bytes .../microedition/lcdui/SimpleTableModel.class | Bin 0 -> 4617 bytes .../microedition/lcdui/SplashScreen$1.class | Bin 0 -> 241 bytes .../microedition/lcdui/SplashScreen$Watchdog.class | Bin 0 -> 1501 bytes .../netbeans/microedition/lcdui/SplashScreen.class | Bin 0 -> 3132 bytes .../netbeans/microedition/lcdui/TableItem.class | Bin 0 -> 14621 bytes .../netbeans/microedition/lcdui/TableModel.class | Bin 0 -> 434 bytes .../microedition/lcdui/TableModelListener.class | Bin 0 -> 227 bytes .../netbeans/microedition/lcdui/WaitScreen$1.class | Bin 0 -> 675 bytes .../lcdui/WaitScreen$BackgroundExecutor$1.class | Bin 0 -> 1159 bytes .../lcdui/WaitScreen$BackgroundExecutor.class | Bin 0 -> 1786 bytes .../netbeans/microedition/lcdui/WaitScreen.class | Bin 0 -> 3918 bytes .../microedition/lcdui/laf/ColorSchema.class | Bin 0 -> 2718 bytes .../microedition/lcdui/laf/SystemColorSchema.class | Bin 0 -> 1770 bytes .../microedition/lcdui/laf/UserColorSchema.class | Bin 0 -> 2132 bytes .../microedition/util/CancellableTask.class | Bin 0 -> 262 bytes .../netbeans/microedition/util/Executable.class | Bin 0 -> 204 bytes .../microedition/util/SimpleCancellableTask.class | Bin 0 -> 1395 bytes trunk/build/preprocessed/gui/geoc.java | 469 +++++++++++++++++++++ trunk/build/preprocessed/nav/locListener.java | 35 ++ trunk/build/preprocessed/nav/navigate.java | 93 ++++ trunk/build/preprocessed/nav/processLoc.java | 104 +++++ trunk/build/preprocessed/nav/processState.java | 50 +++ trunk/build/preverified/gui/geoc.class | Bin 0 -> 8275 bytes trunk/build/preverified/nav/locListener.class | Bin 0 -> 1009 bytes trunk/build/preverified/nav/navigate.class | Bin 0 -> 3168 bytes trunk/build/preverified/nav/processLoc.class | Bin 0 -> 2749 bytes trunk/build/preverified/nav/processState.class | Bin 0 -> 973 bytes .../microedition/lcdui/AbstractInfoScreen.class | Bin 0 -> 5943 bytes .../microedition/lcdui/SimpleTableModel.class | Bin 0 -> 4617 bytes .../microedition/lcdui/SplashScreen$1.class | Bin 0 -> 241 bytes .../microedition/lcdui/SplashScreen$Watchdog.class | Bin 0 -> 1501 bytes .../netbeans/microedition/lcdui/SplashScreen.class | Bin 0 -> 3132 bytes .../netbeans/microedition/lcdui/TableItem.class | Bin 0 -> 14621 bytes .../netbeans/microedition/lcdui/TableModel.class | Bin 0 -> 434 bytes .../microedition/lcdui/TableModelListener.class | Bin 0 -> 227 bytes .../netbeans/microedition/lcdui/WaitScreen$1.class | Bin 0 -> 675 bytes .../lcdui/WaitScreen$BackgroundExecutor$1.class | Bin 0 -> 1159 bytes .../lcdui/WaitScreen$BackgroundExecutor.class | Bin 0 -> 1786 bytes .../netbeans/microedition/lcdui/WaitScreen.class | Bin 0 -> 3918 bytes .../microedition/lcdui/laf/ColorSchema.class | Bin 0 -> 2718 bytes .../microedition/lcdui/laf/SystemColorSchema.class | Bin 0 -> 1770 bytes .../microedition/lcdui/laf/UserColorSchema.class | Bin 0 -> 2132 bytes .../microedition/util/CancellableTask.class | Bin 0 -> 262 bytes .../netbeans/microedition/util/Executable.class | Bin 0 -> 204 bytes .../microedition/util/SimpleCancellableTask.class | Bin 0 -> 1395 bytes trunk/dist/geoc.jad | 8 + trunk/dist/geoc.jar | Bin 0 -> 33448 bytes trunk/nbproject/build-impl.xml | 413 ++++++++++++++++++ trunk/nbproject/genfiles.properties | 8 + trunk/nbproject/private/private.properties | 3 + trunk/nbproject/project.properties | 67 +++ trunk/nbproject/project.xml | 10 + trunk/src/gui/geoc.java | 469 +++++++++++++++++++++ trunk/src/gui/geoc.mvd | 202 +++++++++ trunk/src/nav/locListener.java | 35 ++ trunk/src/nav/navigate.java | 93 ++++ trunk/src/nav/processLoc.java | 104 +++++ trunk/src/nav/processState.java | 50 +++ 93 files changed, 2304 insertions(+) create mode 100755 trunk/build.xml create mode 100755 trunk/build/.timestamp create mode 100755 trunk/build/before-obfuscation.jar create mode 100755 trunk/build/compiled/gui/geoc.class create mode 100755 trunk/build/compiled/nav/locListener.class create mode 100755 trunk/build/compiled/nav/navigate.class create mode 100755 trunk/build/compiled/nav/processLoc.class create mode 100755 trunk/build/compiled/nav/processState.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/AbstractInfoScreen.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/SimpleTableModel.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$1.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/TableItem.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/TableModel.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/TableModelListener.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$1.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/laf/ColorSchema.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/lcdui/laf/UserColorSchema.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/util/CancellableTask.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/util/Executable.class create mode 100755 trunk/build/compiled/org/netbeans/microedition/util/SimpleCancellableTask.class create mode 100755 trunk/build/manifest.mf create mode 100755 trunk/build/obfuscated.jar create mode 100755 trunk/build/obfuscated/META-INF/MANIFEST.MF create mode 100755 trunk/build/obfuscated/gui/geoc.class create mode 100755 trunk/build/obfuscated/nav/locListener.class create mode 100755 trunk/build/obfuscated/nav/navigate.class create mode 100755 trunk/build/obfuscated/nav/processLoc.class create mode 100755 trunk/build/obfuscated/nav/processState.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/AbstractInfoScreen.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/SimpleTableModel.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$1.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableItem.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModel.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModelListener.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$1.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/ColorSchema.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/UserColorSchema.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/util/CancellableTask.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/util/Executable.class create mode 100755 trunk/build/obfuscated/org/netbeans/microedition/util/SimpleCancellableTask.class create mode 100755 trunk/build/preprocessed/gui/geoc.java create mode 100755 trunk/build/preprocessed/nav/locListener.java create mode 100755 trunk/build/preprocessed/nav/navigate.java create mode 100755 trunk/build/preprocessed/nav/processLoc.java create mode 100755 trunk/build/preprocessed/nav/processState.java create mode 100755 trunk/build/preverified/gui/geoc.class create mode 100755 trunk/build/preverified/nav/locListener.class create mode 100755 trunk/build/preverified/nav/navigate.class create mode 100755 trunk/build/preverified/nav/processLoc.class create mode 100755 trunk/build/preverified/nav/processState.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/AbstractInfoScreen.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/SimpleTableModel.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$1.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/TableItem.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/TableModel.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/TableModelListener.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$1.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/laf/ColorSchema.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/lcdui/laf/UserColorSchema.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/util/CancellableTask.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/util/Executable.class create mode 100755 trunk/build/preverified/org/netbeans/microedition/util/SimpleCancellableTask.class create mode 100755 trunk/dist/geoc.jad create mode 100755 trunk/dist/geoc.jar create mode 100755 trunk/nbproject/build-impl.xml create mode 100755 trunk/nbproject/genfiles.properties create mode 100755 trunk/nbproject/private/private.properties create mode 100755 trunk/nbproject/project.properties create mode 100755 trunk/nbproject/project.xml create mode 100755 trunk/src/gui/geoc.java create mode 100755 trunk/src/gui/geoc.mvd create mode 100755 trunk/src/nav/locListener.java create mode 100755 trunk/src/nav/navigate.java create mode 100755 trunk/src/nav/processLoc.java create mode 100755 trunk/src/nav/processState.java diff --git a/trunk/build.xml b/trunk/build.xml new file mode 100755 index 0000000..c442465 --- /dev/null +++ b/trunk/build.xml @@ -0,0 +1,80 @@ + + + + + + Builds, tests, and runs the project . + + + diff --git a/trunk/build/.timestamp b/trunk/build/.timestamp new file mode 100755 index 0000000..999b584 --- /dev/null +++ b/trunk/build/.timestamp @@ -0,0 +1 @@ +ignore me \ No newline at end of file diff --git a/trunk/build/before-obfuscation.jar b/trunk/build/before-obfuscation.jar new file mode 100755 index 0000000..5253e17 Binary files /dev/null and b/trunk/build/before-obfuscation.jar differ diff --git a/trunk/build/compiled/gui/geoc.class b/trunk/build/compiled/gui/geoc.class new file mode 100755 index 0000000..d3fd335 Binary files /dev/null and b/trunk/build/compiled/gui/geoc.class differ diff --git a/trunk/build/compiled/nav/locListener.class b/trunk/build/compiled/nav/locListener.class new file mode 100755 index 0000000..f09faa3 Binary files /dev/null and b/trunk/build/compiled/nav/locListener.class differ diff --git a/trunk/build/compiled/nav/navigate.class b/trunk/build/compiled/nav/navigate.class new file mode 100755 index 0000000..48844e4 Binary files /dev/null and b/trunk/build/compiled/nav/navigate.class differ diff --git a/trunk/build/compiled/nav/processLoc.class b/trunk/build/compiled/nav/processLoc.class new file mode 100755 index 0000000..8fdeffe Binary files /dev/null and b/trunk/build/compiled/nav/processLoc.class differ diff --git a/trunk/build/compiled/nav/processState.class b/trunk/build/compiled/nav/processState.class new file mode 100755 index 0000000..002cefa Binary files /dev/null and b/trunk/build/compiled/nav/processState.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/AbstractInfoScreen.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/AbstractInfoScreen.class new file mode 100755 index 0000000..bf256b3 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/AbstractInfoScreen.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/SimpleTableModel.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/SimpleTableModel.class new file mode 100755 index 0000000..bb39f3c Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/SimpleTableModel.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$1.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$1.class new file mode 100755 index 0000000..3f52272 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$1.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class new file mode 100755 index 0000000..1aa4582 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen.class new file mode 100755 index 0000000..930d603 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/SplashScreen.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/TableItem.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableItem.class new file mode 100755 index 0000000..b4a0d58 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableItem.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModel.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModel.class new file mode 100755 index 0000000..c06fca0 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModel.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModelListener.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModelListener.class new file mode 100755 index 0000000..8d0fdf2 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/TableModelListener.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$1.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$1.class new file mode 100755 index 0000000..e79f14d Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$1.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class new file mode 100755 index 0000000..e34fd5d Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class new file mode 100755 index 0000000..b86b82e Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen.class new file mode 100755 index 0000000..cf6d48a Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/WaitScreen.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/ColorSchema.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/ColorSchema.class new file mode 100755 index 0000000..0d7f3f5 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/ColorSchema.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class new file mode 100755 index 0000000..a702d96 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/UserColorSchema.class b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/UserColorSchema.class new file mode 100755 index 0000000..cd1ac73 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/lcdui/laf/UserColorSchema.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/util/CancellableTask.class b/trunk/build/compiled/org/netbeans/microedition/util/CancellableTask.class new file mode 100755 index 0000000..97d6936 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/util/CancellableTask.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/util/Executable.class b/trunk/build/compiled/org/netbeans/microedition/util/Executable.class new file mode 100755 index 0000000..83cb718 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/util/Executable.class differ diff --git a/trunk/build/compiled/org/netbeans/microedition/util/SimpleCancellableTask.class b/trunk/build/compiled/org/netbeans/microedition/util/SimpleCancellableTask.class new file mode 100755 index 0000000..0ab8538 Binary files /dev/null and b/trunk/build/compiled/org/netbeans/microedition/util/SimpleCancellableTask.class differ diff --git a/trunk/build/manifest.mf b/trunk/build/manifest.mf new file mode 100755 index 0000000..f288e61 --- /dev/null +++ b/trunk/build/manifest.mf @@ -0,0 +1,6 @@ +MIDlet-1: geoc,,gui.geoc +MIDlet-Vendor: manut.de +MIDlet-Version: 0.1 +MIDlet-Name: geoc +MicroEdition-Configuration: CLDC-1.1 +MicroEdition-Profile: MIDP-2.0 diff --git a/trunk/build/obfuscated.jar b/trunk/build/obfuscated.jar new file mode 100755 index 0000000..5253e17 Binary files /dev/null and b/trunk/build/obfuscated.jar differ diff --git a/trunk/build/obfuscated/META-INF/MANIFEST.MF b/trunk/build/obfuscated/META-INF/MANIFEST.MF new file mode 100755 index 0000000..e88e935 --- /dev/null +++ b/trunk/build/obfuscated/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Ant-Version: Apache Ant 1.6.5 +Created-By: 1.5.0_10-b03 (Sun Microsystems Inc.) + diff --git a/trunk/build/obfuscated/gui/geoc.class b/trunk/build/obfuscated/gui/geoc.class new file mode 100755 index 0000000..d3fd335 Binary files /dev/null and b/trunk/build/obfuscated/gui/geoc.class differ diff --git a/trunk/build/obfuscated/nav/locListener.class b/trunk/build/obfuscated/nav/locListener.class new file mode 100755 index 0000000..f09faa3 Binary files /dev/null and b/trunk/build/obfuscated/nav/locListener.class differ diff --git a/trunk/build/obfuscated/nav/navigate.class b/trunk/build/obfuscated/nav/navigate.class new file mode 100755 index 0000000..48844e4 Binary files /dev/null and b/trunk/build/obfuscated/nav/navigate.class differ diff --git a/trunk/build/obfuscated/nav/processLoc.class b/trunk/build/obfuscated/nav/processLoc.class new file mode 100755 index 0000000..8fdeffe Binary files /dev/null and b/trunk/build/obfuscated/nav/processLoc.class differ diff --git a/trunk/build/obfuscated/nav/processState.class b/trunk/build/obfuscated/nav/processState.class new file mode 100755 index 0000000..002cefa Binary files /dev/null and b/trunk/build/obfuscated/nav/processState.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/AbstractInfoScreen.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/AbstractInfoScreen.class new file mode 100755 index 0000000..bf256b3 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/AbstractInfoScreen.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SimpleTableModel.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SimpleTableModel.class new file mode 100755 index 0000000..bb39f3c Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SimpleTableModel.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$1.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$1.class new file mode 100755 index 0000000..3f52272 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$1.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class new file mode 100755 index 0000000..1aa4582 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen.class new file mode 100755 index 0000000..930d603 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/SplashScreen.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableItem.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableItem.class new file mode 100755 index 0000000..b4a0d58 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableItem.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModel.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModel.class new file mode 100755 index 0000000..c06fca0 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModel.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModelListener.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModelListener.class new file mode 100755 index 0000000..8d0fdf2 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/TableModelListener.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$1.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$1.class new file mode 100755 index 0000000..e79f14d Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$1.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class new file mode 100755 index 0000000..e34fd5d Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class new file mode 100755 index 0000000..b86b82e Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen.class new file mode 100755 index 0000000..cf6d48a Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/WaitScreen.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/ColorSchema.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/ColorSchema.class new file mode 100755 index 0000000..0d7f3f5 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/ColorSchema.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class new file mode 100755 index 0000000..a702d96 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/UserColorSchema.class b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/UserColorSchema.class new file mode 100755 index 0000000..cd1ac73 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/lcdui/laf/UserColorSchema.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/util/CancellableTask.class b/trunk/build/obfuscated/org/netbeans/microedition/util/CancellableTask.class new file mode 100755 index 0000000..97d6936 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/util/CancellableTask.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/util/Executable.class b/trunk/build/obfuscated/org/netbeans/microedition/util/Executable.class new file mode 100755 index 0000000..83cb718 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/util/Executable.class differ diff --git a/trunk/build/obfuscated/org/netbeans/microedition/util/SimpleCancellableTask.class b/trunk/build/obfuscated/org/netbeans/microedition/util/SimpleCancellableTask.class new file mode 100755 index 0000000..0ab8538 Binary files /dev/null and b/trunk/build/obfuscated/org/netbeans/microedition/util/SimpleCancellableTask.class differ diff --git a/trunk/build/preprocessed/gui/geoc.java b/trunk/build/preprocessed/gui/geoc.java new file mode 100755 index 0000000..ba54077 --- /dev/null +++ b/trunk/build/preprocessed/gui/geoc.java @@ -0,0 +1,469 @@ +/* + * geoc.java + * + * Created on July 14, 2007, 1:29 AM + */ + +package gui; + +import javax.microedition.midlet.*; +import javax.microedition.lcdui.*; +import javax.microedition.location.LocationException; +import java.util.Timer; +import nav.*; + +/** + * + * @author manut + */ +public class geoc extends MIDlet implements CommandListener { + + private navigate nav; + + /** + * Creates a new instance of geoc + */ + public geoc() { + + try { + + nav = new navigate(this); + + } catch (LocationException e) { + + this.get_stringItemHead1().setText("no GPS!/n"); + + } + } + + private Form editForm;//GEN-BEGIN:MVDFields + private StringItem stringItemHead1; + private Command exitCommand; + private TextField textFieldEnterNorth; + private TextField textFieldEnterEast; + private Spacer spacer1; + private StringItem stringItemEnterDest; + private Command screenCommand1; + private Command exitCommand1; + private Command exitCommand2; + private Command itemCommand1; + private Command itemCommand2; + private Form navForm; + private Command exitCommand3; + private Command exitCommand4; + private Command screenCommand2; + private StringItem stringItemHead2; + private Spacer spacer2; + private StringItem stringItemCourse; + private StringItem stringItemDistance; + private StringItem stringItemActNorth; + private StringItem stringItemActEast; + private StringItem stringItemActHeight; + private StringItem stringItemDestination; + private StringItem stringItemDestNorth; + private StringItem stringItemDestEast; + private Command okCommand1;//GEN-END:MVDFields + +//GEN-LINE:MVDMethods + + /** This method initializes UI of the application.//GEN-BEGIN:MVDInitBegin + */ + private void initialize() {//GEN-END:MVDInitBegin + // Insert pre-init code here + navForm = new Form(null, new Item[] {//GEN-BEGIN:MVDInitInit + get_stringItemHead2(), + get_spacer2(), + get_stringItemCourse(), + get_stringItemDistance(), + get_stringItemActNorth(), + get_stringItemActEast(), + get_stringItemActHeight(), + get_stringItemDestination(), + get_stringItemDestNorth(), + get_stringItemDestEast() + }); + navForm.addCommand(get_exitCommand4()); + navForm.addCommand(get_screenCommand2()); + navForm.setCommandListener(this); + editForm = new Form(null, new Item[] { + get_stringItemHead1(), + get_spacer1(), + get_stringItemEnterDest(), + get_textFieldEnterNorth(), + get_textFieldEnterEast() + }); + editForm.addCommand(get_exitCommand()); + editForm.addCommand(get_okCommand1()); + editForm.setCommandListener(this); + getDisplay().setCurrent(editForm);//GEN-END:MVDInitInit + // Insert post-init code here + }//GEN-LINE:MVDInitEnd + + /** Called by the system to indicate that a command has been invoked on a particular displayable.//GEN-BEGIN:MVDCABegin + * @param command the Command that ws invoked + * @param displayable the Displayable on which the command was invoked + */ + public void commandAction(Command command, Displayable displayable) {//GEN-END:MVDCABegin + // Insert global pre-action code here + if (displayable == editForm) {//GEN-BEGIN:MVDCABody + if (command == exitCommand) {//GEN-END:MVDCABody + // Insert pre-action code here + exitMIDlet();//GEN-LINE:MVDCAAction3 + // Insert post-action code here at gui.geoc.(geoc.java:34) + } else if (command == okCommand1) {//GEN-LINE:MVDCACase3 + // Insert pre-action code here + javax.microedition.lcdui.Alert al = new javax.microedition.lcdui.Alert("Error"); + al.setString("Coord. parsing failed\nor no gps!"); + try { + nav.setDestination(get_textFieldEnterNorth().getString(), get_textFieldEnterEast().getString()); + } catch(Exception ae) { + getDisplay().setCurrent(al, navForm); + } + getDisplay().setCurrent(navForm); + /* +getDisplay ().setCurrent (navForm);//GEN-LINE:MVDCAAction43 + // Iert post-action code here + */ + }//GEN-BEGIN:MVDCACase43 + } else if (displayable == navForm) { + if (command == exitCommand4) {//GEN-END:MVDCACase43 + // Insert pre-action code here + exitMIDlet();//GEN-LINE:MVDCAAction24 + // Insert post-action code here + } else if (command == screenCommand2) {//GEN-LINE:MVDCACase24 + // Insert pre-action code here + getDisplay().setCurrent(editForm);//GEN-LINE:MVDCAAction26 + // Insert post-action code here + }//GEN-BEGIN:MVDCACase26 + }//GEN-END:MVDCACase26 + // Insert global post-action code here +}//GEN-LINE:MVDCAEnd + + /** + * This method should return an instance of the display. + */ + public Display getDisplay() {//GEN-FIRST:MVDGetDisplay + return Display.getDisplay(this); + }//GEN-LAST:MVDGetDisplay + + /** + * This method should exit the midlet. + */ + public void exitMIDlet() {//GEN-FIRST:MVDExitMidlet + getDisplay().setCurrent(null); + destroyApp(true); + notifyDestroyed(); + }//GEN-LAST:MVDExitMidlet + + + /** This method returns instance for stringItemHead1 component and should be called instead of accessing stringItemHead1 field directly.//GEN-BEGIN:MVDGetBegin4 + * @return Instance for stringItemHead1 component + */ + public StringItem get_stringItemHead1() { + if (stringItemHead1 == null) {//GEN-END:MVDGetBegin4 + // Insert pre-init code here + stringItemHead1 = new StringItem("geoc", "v0.1");//GEN-LINE:MVDGetInit4 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd4 + return stringItemHead1; + }//GEN-END:MVDGetEnd4 + + /** This method returns instance for exitCommand component and should be called instead of accessing exitCommand field directly.//GEN-BEGIN:MVDGetBegin5 + * @return Instance for exitCommand component + */ + public Command get_exitCommand() { + if (exitCommand == null) {//GEN-END:MVDGetBegin5 + // Insert pre-init code here + exitCommand = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit5 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd5 + return exitCommand; + }//GEN-END:MVDGetEnd5 + + /** This method returns instance for textFieldEnterNorth component and should be called instead of accessing textFieldEnterNorth field directly.//GEN-BEGIN:MVDGetBegin6 + * @return Instance for textFieldEnterNorth component + */ + public TextField get_textFieldEnterNorth() { + if (textFieldEnterNorth == null) {//GEN-END:MVDGetBegin6 + // Insert pre-init code here + textFieldEnterNorth = new TextField("North", "47:42.466", 120, TextField.ANY);//GEN-LINE:MVDGetInit6 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd6 + return textFieldEnterNorth; + }//GEN-END:MVDGetEnd6 + + /** This method returns instance for textFieldEnterEast component and should be called instead of accessing textFieldEnterEast field directly.//GEN-BEGIN:MVDGetBegin7 + * @return Instance for textFieldEnterEast component + */ + public TextField get_textFieldEnterEast() { + if (textFieldEnterEast == null) {//GEN-END:MVDGetBegin7 + // Insert pre-init code here + textFieldEnterEast = new TextField("East", "9:36.620", 120, TextField.ANY);//GEN-LINE:MVDGetInit7 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd7 + return textFieldEnterEast; + }//GEN-END:MVDGetEnd7 + + /** This method returns instance for spacer1 component and should be called instead of accessing spacer1 field directly.//GEN-BEGIN:MVDGetBegin9 + * @return Instance for spacer1 component + */ + public Spacer get_spacer1() { + if (spacer1 == null) {//GEN-END:MVDGetBegin9 + // Insert pre-init code here + spacer1 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit9 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd9 + return spacer1; + }//GEN-END:MVDGetEnd9 + + /** This method returns instance for stringItemEnterDest component and should be called instead of accessing stringItemEnterDest field directly.//GEN-BEGIN:MVDGetBegin10 + * @return Instance for stringItemEnterDest component + */ + public StringItem get_stringItemEnterDest() { + if (stringItemEnterDest == null) {//GEN-END:MVDGetBegin10 + // Insert pre-init code here + stringItemEnterDest = new StringItem("\nEnter Destination", "");//GEN-LINE:MVDGetInit10 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd10 + return stringItemEnterDest; + }//GEN-END:MVDGetEnd10 + + /** This method returns instance for screenCommand1 component and should be called instead of accessing screenCommand1 field directly.//GEN-BEGIN:MVDGetBegin11 + * @return Instance for screenCommand1 component + */ + public Command get_screenCommand1() { + if (screenCommand1 == null) {//GEN-END:MVDGetBegin11 + // Insert pre-init code here + screenCommand1 = new Command("go to", Command.SCREEN, 1);//GEN-LINE:MVDGetInit11 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd11 + return screenCommand1; + }//GEN-END:MVDGetEnd11 + + /** This method returns instance for exitCommand1 component and should be called instead of accessing exitCommand1 field directly.//GEN-BEGIN:MVDGetBegin15 + * @return Instance for exitCommand1 component + */ + public Command get_exitCommand1() { + if (exitCommand1 == null) {//GEN-END:MVDGetBegin15 + // Insert pre-init code here + exitCommand1 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit15 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd15 + return exitCommand1; + }//GEN-END:MVDGetEnd15 + + /** This method returns instance for exitCommand2 component and should be called instead of accessing exitCommand2 field directly.//GEN-BEGIN:MVDGetBegin16 + * @return Instance for exitCommand2 component + */ + public Command get_exitCommand2() { + if (exitCommand2 == null) {//GEN-END:MVDGetBegin16 + // Insert pre-init code here + exitCommand2 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit16 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd16 + return exitCommand2; + }//GEN-END:MVDGetEnd16 + + /** This method returns instance for itemCommand1 component and should be called instead of accessing itemCommand1 field directly.//GEN-BEGIN:MVDGetBegin18 + * @return Instance for itemCommand1 component + */ + public Command get_itemCommand1() { + if (itemCommand1 == null) {//GEN-END:MVDGetBegin18 + // Insert pre-init code here + itemCommand1 = new Command("Item", Command.ITEM, 1);//GEN-LINE:MVDGetInit18 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd18 + return itemCommand1; + }//GEN-END:MVDGetEnd18 + + /** This method returns instance for itemCommand2 component and should be called instead of accessing itemCommand2 field directly.//GEN-BEGIN:MVDGetBegin19 + * @return Instance for itemCommand2 component + */ + public Command get_itemCommand2() { + if (itemCommand2 == null) {//GEN-END:MVDGetBegin19 + // Insert pre-init code here + itemCommand2 = new Command("Edit Coord.", Command.ITEM, 1);//GEN-LINE:MVDGetInit19 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd19 + return itemCommand2; + }//GEN-END:MVDGetEnd19 + + /** This method returns instance for exitCommand3 component and should be called instead of accessing exitCommand3 field directly.//GEN-BEGIN:MVDGetBegin22 + * @return Instance for exitCommand3 component + */ + public Command get_exitCommand3() { + if (exitCommand3 == null) {//GEN-END:MVDGetBegin22 + // Insert pre-init code here + exitCommand3 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit22 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd22 + return exitCommand3; + }//GEN-END:MVDGetEnd22 + + /** This method returns instance for exitCommand4 component and should be called instead of accessing exitCommand4 field directly.//GEN-BEGIN:MVDGetBegin23 + * @return Instance for exitCommand4 component + */ + public Command get_exitCommand4() { + if (exitCommand4 == null) {//GEN-END:MVDGetBegin23 + // Insert pre-init code here + exitCommand4 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit23 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd23 + return exitCommand4; + }//GEN-END:MVDGetEnd23 + + /** This method returns instance for screenCommand2 component and should be called instead of accessing screenCommand2 field directly.//GEN-BEGIN:MVDGetBegin25 + * @return Instance for screenCommand2 component + */ + public Command get_screenCommand2() { + if (screenCommand2 == null) {//GEN-END:MVDGetBegin25 + // Insert pre-init code here + screenCommand2 = new Command("edit Coord.", Command.SCREEN, 1);//GEN-LINE:MVDGetInit25 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd25 + return screenCommand2; + }//GEN-END:MVDGetEnd25 + + /** This method returns instance for stringItemHead2 component and should be called instead of accessing stringItemHead2 field directly.//GEN-BEGIN:MVDGetBegin27 + * @return Instance for stringItemHead2 component + */ + public StringItem get_stringItemHead2() { + if (stringItemHead2 == null) {//GEN-END:MVDGetBegin27 + // Insert pre-init code here + stringItemHead2 = new StringItem("geoc", "v0.1");//GEN-LINE:MVDGetInit27 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd27 + return stringItemHead2; + }//GEN-END:MVDGetEnd27 + + /** This method returns instance for spacer2 component and should be called instead of accessing spacer2 field directly.//GEN-BEGIN:MVDGetBegin28 + * @return Instance for spacer2 component + */ + public Spacer get_spacer2() { + if (spacer2 == null) {//GEN-END:MVDGetBegin28 + // Insert pre-init code here + spacer2 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit28 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd28 + return spacer2; + }//GEN-END:MVDGetEnd28 + + /** This method returns instance for stringItemCourse component and should be called instead of accessing stringItemCourse field directly.//GEN-BEGIN:MVDGetBegin29 + * @return Instance for stringItemCourse component + */ + public StringItem get_stringItemCourse() { + if (stringItemCourse == null) {//GEN-END:MVDGetBegin29 + // Insert pre-init code here + stringItemCourse = new StringItem("\nCourse", "0");//GEN-LINE:MVDGetInit29 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd29 + return stringItemCourse; + }//GEN-END:MVDGetEnd29 + + /** This method returns instance for stringItemDistance component and should be called instead of accessing stringItemDistance field directly.//GEN-BEGIN:MVDGetBegin34 + * @return Instance for stringItemDistance component + */ + public StringItem get_stringItemDistance() { + if (stringItemDistance == null) {//GEN-END:MVDGetBegin34 + // Insert pre-init code here + stringItemDistance = new StringItem("Distance", "0");//GEN-LINE:MVDGetInit34 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd34 + return stringItemDistance; + }//GEN-END:MVDGetEnd34 + + /** This method returns instance for stringItemActNorth component and should be called instead of accessing stringItemActNorth field directly.//GEN-BEGIN:MVDGetBegin35 + * @return Instance for stringItemActNorth component + */ + public StringItem get_stringItemActNorth() { + if (stringItemActNorth == null) {//GEN-END:MVDGetBegin35 + // Insert pre-init code here + stringItemActNorth = new StringItem("\nNorth", "0");//GEN-LINE:MVDGetInit35 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd35 + return stringItemActNorth; + }//GEN-END:MVDGetEnd35 + + /** This method returns instance for stringItemActEast component and should be called instead of accessing stringItemActEast field directly.//GEN-BEGIN:MVDGetBegin36 + * @return Instance for stringItemActEast component + */ + public StringItem get_stringItemActEast() { + if (stringItemActEast == null) {//GEN-END:MVDGetBegin36 + // Insert pre-init code here + stringItemActEast = new StringItem("East", "0");//GEN-LINE:MVDGetInit36 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd36 + return stringItemActEast; + }//GEN-END:MVDGetEnd36 + + /** This method returns instance for stringItemActHeight component and should be called instead of accessing stringItemActHeight field directly.//GEN-BEGIN:MVDGetBegin37 + * @return Instance for stringItemActHeight component + */ + public StringItem get_stringItemActHeight() { + if (stringItemActHeight == null) {//GEN-END:MVDGetBegin37 + // Insert pre-init code here + stringItemActHeight = new StringItem("Height", "0");//GEN-LINE:MVDGetInit37 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd37 + return stringItemActHeight; + }//GEN-END:MVDGetEnd37 + + /** This method returns instance for stringItemDestination component and should be called instead of accessing stringItemDestination field directly.//GEN-BEGIN:MVDGetBegin38 + * @return Instance for stringItemDestination component + */ + public StringItem get_stringItemDestination() { + if (stringItemDestination == null) {//GEN-END:MVDGetBegin38 + // Insert pre-init code here + stringItemDestination = new StringItem("\nDestination", "");//GEN-LINE:MVDGetInit38 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd38 + return stringItemDestination; + }//GEN-END:MVDGetEnd38 + + /** This method returns instance for stringItemDestNorth component and should be called instead of accessing stringItemDestNorth field directly.//GEN-BEGIN:MVDGetBegin40 + * @return Instance for stringItemDestNorth component + */ + public StringItem get_stringItemDestNorth() { + if (stringItemDestNorth == null) {//GEN-END:MVDGetBegin40 + // Insert pre-init code here + stringItemDestNorth = new StringItem("North", "0");//GEN-LINE:MVDGetInit40 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd40 + return stringItemDestNorth; + }//GEN-END:MVDGetEnd40 + + /** This method returns instance for stringItemDestEast component and should be called instead of accessing stringItemDestEast field directly.//GEN-BEGIN:MVDGetBegin41 + * @return Instance for stringItemDestEast component + */ + public StringItem get_stringItemDestEast() { + if (stringItemDestEast == null) {//GEN-END:MVDGetBegin41 + // Insert pre-init code here + stringItemDestEast = new StringItem("East", "0");//GEN-LINE:MVDGetInit41 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd41 + return stringItemDestEast; + }//GEN-END:MVDGetEnd41 + + /** This method returns instance for okCommand1 component and should be called instead of accessing okCommand1 field directly.//GEN-BEGIN:MVDGetBegin42 + * @return Instance for okCommand1 component + */ + public Command get_okCommand1() { + if (okCommand1 == null) {//GEN-END:MVDGetBegin42 + // Insert pre-init code here + okCommand1 = new Command("goto", Command.OK, 1);//GEN-LINE:MVDGetInit42 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd42 + return okCommand1; + }//GEN-END:MVDGetEnd42 + + public void startApp() { + initialize(); + } + + public void pauseApp() { + } + + public void destroyApp(boolean unconditional) { + } + +} diff --git a/trunk/build/preprocessed/nav/locListener.java b/trunk/build/preprocessed/nav/locListener.java new file mode 100755 index 0000000..54ff7db --- /dev/null +++ b/trunk/build/preprocessed/nav/locListener.java @@ -0,0 +1,35 @@ +/* + * locListener.java + * + * Created on July 14, 2007, 4:20 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import javax.microedition.location.*; + +/** + * + * @author manut + */ +public class locListener implements LocationListener { + + private navigate nav; + + /** Creates a new instance of locListener */ + public locListener(navigate _nav) { + nav = _nav; + } + + public void providerStateChanged(LocationProvider prov, int newState){ + nav.setNewState(newState); + } + + public void locationUpdated(LocationProvider prov, Location location){ + nav.setNewLoc(location); + } + +} diff --git a/trunk/build/preprocessed/nav/navigate.java b/trunk/build/preprocessed/nav/navigate.java new file mode 100755 index 0000000..eeaffce --- /dev/null +++ b/trunk/build/preprocessed/nav/navigate.java @@ -0,0 +1,93 @@ +/* + * navigate.java + * + * Created on July 14, 2007, 2:18 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import javax.microedition.location.*; +import gui.geoc; +import java.lang.Thread; + +/** + * + * @author manut + */ +public class navigate { + + private geoc gui; + private LocationProvider pos; + private int provState; + + private Location actLoc; + private Landmark dest; + + private processLoc pLoc; + private processState pState; + + /** Creates a new instance of navigate */ + public navigate(geoc _gui) throws LocationException { + + pos = LocationProvider.getInstance(null); + if (pos == null) + throw new LocationException(); + + gui = _gui; + pLoc = new processLoc(gui); + pState = new processState(gui); + } + + /** sets destination */ + public void setDestination ( String north, String east ) + throws IllegalArgumentException { + + double latitude, longitude; + float altitude, hAcc, vAcc; + + latitude = Coordinates.convert(north); + longitude = Coordinates.convert(east); + + altitude = Float.NaN; + hAcc = 0; + vAcc = 0; + + QualifiedCoordinates coord; + coord = new QualifiedCoordinates( latitude, + longitude, + altitude, hAcc, vAcc + ); + + if(dest == null){ + AddressInfo info = new AddressInfo(); + dest = new Landmark("destination", "stageX", coord, info); + } else + dest.setQualifiedCoordinates(coord); + + + locListener locList = new locListener(this); + int interval = -1; + + gui.get_stringItemDestNorth().setText(north); + gui.get_stringItemDestEast().setText(east); + + pos.setLocationListener(locList, interval, 0, 0); + + } + + public void setNewLoc(Location loc){ + actLoc = loc; + pLoc.set(loc, dest); + pLoc.run(); + } + + public void setNewState(int state){ + provState = state; + pState.set(state); + pState.run(); + } + +} diff --git a/trunk/build/preprocessed/nav/processLoc.java b/trunk/build/preprocessed/nav/processLoc.java new file mode 100755 index 0000000..fdcd863 --- /dev/null +++ b/trunk/build/preprocessed/nav/processLoc.java @@ -0,0 +1,104 @@ +/* + * processLoc.java + * + * Created on July 14, 2007, 4:59 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import java.lang.Thread; +import javax.microedition.location.*; + +import gui.*; + +/** + * + * @author manut + */ +public class processLoc extends Thread { + + private geoc gui; + private Landmark dest; + private Location loc; + private Coordinates lastloc; + private Coordinates north; + + /** Creates a new instance of processLoc */ + public processLoc(geoc _gui) { + gui = _gui; + north = new Coordinates(90, 0, 0); + lastloc = null; + } + + public void set(Location _loc, Landmark _dest){ + + loc = _loc; + dest = _dest; + + } + + private double arcsin(double azimuth){ + double calc; + double last_calc = 0; + + for(double i = -1; i <= 1; i=i+0.001){ + calc = java.lang.Math.sin(i); + if ( calc == azimuth ){ + return i; + } else if (last_calc <= azimuth && calc > azimuth){ + return i; + } else + last_calc = calc; + } + return -2; + } + + public void run(){ + // calc course, distance + // A = LastPosition + // B = Destination + // C = Northpole + // D = ActPosition + // E = going further on straight forward, until you meet BC + // + // alphaI = arcsin( ( CD * sin(gammaI) ) / AB ) + // betaI = arcsin( ( CD * sin(gammaII)) / BD ) + // deltaI = 180 - alphaI - gammaI + // deltaII = 180 - deltaI + // epsilI = 180 - deltaII - gammaII + // epsilII = 180 - epsilI + // gesucht = 180 - epsilII - betaI + // --> courseCorrection = - 180 - arcsin( (CD * sin(gammaI)) / AB ) - gammaI - gammaII - arcsin( CD * (sin(gammaII)) / BD ) + + if( (lastloc!= null) && loc.isValid()) + { + + float gammaI = lastloc.azimuthTo(loc.getQualifiedCoordinates()); + float gammaII = loc.getQualifiedCoordinates().azimuthTo(dest.getQualifiedCoordinates()); + float AB = lastloc.distance(dest.getQualifiedCoordinates()); + float BD = loc.getQualifiedCoordinates().distance(dest.getQualifiedCoordinates()); + float CD = loc.getQualifiedCoordinates().distance(north); + + double actC = ( - 180 - arcsin( (CD * java.lang.Math.sin(gammaI)) / AB ) - gammaI - gammaII - arcsin( CD * (java.lang.Math.sin(gammaII)) / BD ) ) % 360; + int actCourse = (int) actC; + if (actCourse < 0) + actCourse = actCourse+360; + + // set GUI + gui.get_stringItemActNorth().setText(Coordinates.convert(loc.getQualifiedCoordinates().getLatitude(), 2)); + gui.get_stringItemActEast().setText(Coordinates.convert(loc.getQualifiedCoordinates().getLongitude(), 2)); + gui.get_stringItemActHeight().setText(String.valueOf(loc.getQualifiedCoordinates().getAltitude())); + if ( (actCourse != 112) ) + gui.get_stringItemCourse().setText(String.valueOf(actCourse)); + gui.get_stringItemDistance().setText(String.valueOf(BD)); + + } + + if ( loc.isValid() ) + lastloc = loc.getQualifiedCoordinates(); + } + +} diff --git a/trunk/build/preprocessed/nav/processState.java b/trunk/build/preprocessed/nav/processState.java new file mode 100755 index 0000000..9c7d756 --- /dev/null +++ b/trunk/build/preprocessed/nav/processState.java @@ -0,0 +1,50 @@ +/* + * processState.java + * + * Created on July 14, 2007, 5:02 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import gui.*; +import java.lang.Thread; +import javax.microedition.location.*; + +/** + * + * @author manut + */ +public class processState extends Thread{ + + private geoc gui; + private int state; + + /** Creates a new instance of processState */ + public processState(geoc _gui) { + gui = _gui; + } + + public void set(int _state){ + state = _state; + } + + public void run(){ + switch(state){ + case LocationProvider.AVAILABLE: + gui.get_stringItemHead2().setLabel("GPS available"); + break; + case LocationProvider.OUT_OF_SERVICE: + gui.get_stringItemHead2().setLabel("no GPS!"); + break; + case LocationProvider.TEMPORARILY_UNAVAILABLE: + gui.get_stringItemHead2().setLabel("weak GPS signal"); + break; + default: + gui.get_stringItemHead2().setLabel("Location API Error"); + } + } + +} diff --git a/trunk/build/preverified/gui/geoc.class b/trunk/build/preverified/gui/geoc.class new file mode 100755 index 0000000..7b2e137 Binary files /dev/null and b/trunk/build/preverified/gui/geoc.class differ diff --git a/trunk/build/preverified/nav/locListener.class b/trunk/build/preverified/nav/locListener.class new file mode 100755 index 0000000..f09faa3 Binary files /dev/null and b/trunk/build/preverified/nav/locListener.class differ diff --git a/trunk/build/preverified/nav/navigate.class b/trunk/build/preverified/nav/navigate.class new file mode 100755 index 0000000..badcd48 Binary files /dev/null and b/trunk/build/preverified/nav/navigate.class differ diff --git a/trunk/build/preverified/nav/processLoc.class b/trunk/build/preverified/nav/processLoc.class new file mode 100755 index 0000000..ced561b Binary files /dev/null and b/trunk/build/preverified/nav/processLoc.class differ diff --git a/trunk/build/preverified/nav/processState.class b/trunk/build/preverified/nav/processState.class new file mode 100755 index 0000000..f9f222d Binary files /dev/null and b/trunk/build/preverified/nav/processState.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/AbstractInfoScreen.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/AbstractInfoScreen.class new file mode 100755 index 0000000..bf256b3 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/AbstractInfoScreen.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/SimpleTableModel.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/SimpleTableModel.class new file mode 100755 index 0000000..bb39f3c Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/SimpleTableModel.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$1.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$1.class new file mode 100755 index 0000000..3f52272 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$1.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class new file mode 100755 index 0000000..1aa4582 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen$Watchdog.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen.class new file mode 100755 index 0000000..930d603 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/SplashScreen.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/TableItem.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableItem.class new file mode 100755 index 0000000..b4a0d58 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableItem.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModel.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModel.class new file mode 100755 index 0000000..c06fca0 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModel.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModelListener.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModelListener.class new file mode 100755 index 0000000..8d0fdf2 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/TableModelListener.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$1.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$1.class new file mode 100755 index 0000000..e79f14d Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$1.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class new file mode 100755 index 0000000..e34fd5d Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor$1.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class new file mode 100755 index 0000000..b86b82e Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen$BackgroundExecutor.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen.class new file mode 100755 index 0000000..cf6d48a Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/WaitScreen.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/ColorSchema.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/ColorSchema.class new file mode 100755 index 0000000..0d7f3f5 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/ColorSchema.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class new file mode 100755 index 0000000..a702d96 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/SystemColorSchema.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/UserColorSchema.class b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/UserColorSchema.class new file mode 100755 index 0000000..cd1ac73 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/lcdui/laf/UserColorSchema.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/util/CancellableTask.class b/trunk/build/preverified/org/netbeans/microedition/util/CancellableTask.class new file mode 100755 index 0000000..97d6936 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/util/CancellableTask.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/util/Executable.class b/trunk/build/preverified/org/netbeans/microedition/util/Executable.class new file mode 100755 index 0000000..83cb718 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/util/Executable.class differ diff --git a/trunk/build/preverified/org/netbeans/microedition/util/SimpleCancellableTask.class b/trunk/build/preverified/org/netbeans/microedition/util/SimpleCancellableTask.class new file mode 100755 index 0000000..0ab8538 Binary files /dev/null and b/trunk/build/preverified/org/netbeans/microedition/util/SimpleCancellableTask.class differ diff --git a/trunk/dist/geoc.jad b/trunk/dist/geoc.jad new file mode 100755 index 0000000..aff48af --- /dev/null +++ b/trunk/dist/geoc.jad @@ -0,0 +1,8 @@ +MIDlet-1: geoc,,gui.geoc +MIDlet-Jar-Size: 33448 +MIDlet-Jar-URL: geoc.jar +MIDlet-Name: geoc +MIDlet-Vendor: manut.de +MIDlet-Version: 0.1 +MicroEdition-Configuration: CLDC-1.1 +MicroEdition-Profile: MIDP-2.0 diff --git a/trunk/dist/geoc.jar b/trunk/dist/geoc.jar new file mode 100755 index 0000000..987c335 Binary files /dev/null and b/trunk/dist/geoc.jar differ diff --git a/trunk/nbproject/build-impl.xml b/trunk/nbproject/build-impl.xml new file mode 100755 index 0000000..a2a8c8a --- /dev/null +++ b/trunk/nbproject/build-impl.xml @@ -0,0 +1,413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Classpath to J2ME Ant extension library (libs.j2me_ant_ext.classpath property) is not set. For example: location of mobility/modules/org-netbeans-modules-kjava-antext.jar file in the IDE installation directory. + Platform home (platform.home property) is not set. Value of this property should be ${platform.active.description} emulator home directory location. + Platform boot classpath (platform.bootclasspath property) is not set. Value of this property should be ${platform.active.description} emulator boot classpath containing all J2ME classes provided by emulator. + Must set src.dir + Must set build.dir + Must set build.classes.dir + Must set preprocessed.dir + Must set preverify.classes.dir + Must set obfuscated.classes.dir + Must set dist.dir + Must set dist.jar + Must set dist.jad + Must set obfuscator.srcjar + Must set obfuscator.destjar + Must set dist.javadoc.dir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.jad} + ${manifest.midlets}${evaluated.manifest.apipermissions}${evaluated.manifest.pushregistry}${manifest.others}${manifest.manifest} + + + + + MicroEdition-Configuration: ${platform.configuration} + + MicroEdition-Configuration: ${platform.configuration} + + + + MicroEdition-Profile: ${platform.profile} + + MicroEdition-Profile: ${platform.profile} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property deployment.${deployment.method}.scriptfile not set. The property should point to an Ant script providing ${deployment.method} deployment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Property build.root.dir is not set. By default its value should be \"build\". + Property dist.root.dir is not set. By default its value should be \"dist\". + + + + + + + diff --git a/trunk/nbproject/genfiles.properties b/trunk/nbproject/genfiles.properties new file mode 100755 index 0000000..2c80b6b --- /dev/null +++ b/trunk/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=287f2d3f +build.xml.script.CRC32=7593e195 +build.xml.stylesheet.CRC32=790018fc +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=287f2d3f +nbproject/build-impl.xml.script.CRC32=036a5e16 +nbproject/build-impl.xml.stylesheet.CRC32=a16fb29f diff --git a/trunk/nbproject/private/private.properties b/trunk/nbproject/private/private.properties new file mode 100755 index 0000000..5b481a1 --- /dev/null +++ b/trunk/nbproject/private/private.properties @@ -0,0 +1,3 @@ +config.active= +javadoc.preview=true +netbeans.user=/root/.netbeans/5.5.1 diff --git a/trunk/nbproject/project.properties b/trunk/nbproject/project.properties new file mode 100755 index 0000000..76ae6fe --- /dev/null +++ b/trunk/nbproject/project.properties @@ -0,0 +1,67 @@ +abilities=JSR234=1.0,WMA=2.0,SATSACRYPTO=1.0,OBEX=1.0,MMAPI=1.1,JSR211=1.0,JSR172=1.0,ScreenWidth=240,JSR239=1.0,ScreenColorDepth=8,JSR177=1.0,ColorScreen,JSR238=1.0,JSR179=1.0.1,JSR226=1.0,JSR75=1.0,ScreenHeight=320,CLDC=1.1,J2MEWS=1.0,J2MEXMLRPC=1.0,SATSAAPDU=1.0,JSR229=1.1.0,JSR180=1.0.1,SATSAJCRMI=1.0,JSR184=1.1,SATSAPKI=1.0,MIDP=2.1,JSR82=1.1, +build.classes.dir=${build.dir}/compiled +build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.mvd,**/*.wsclient +build.dir=build/${config.active} +build.root.dir=build +debug.level=debug +deployment.copy.target=deploy +deployment.jarurl=${dist.jar} +deployment.method=NONE +deployment.override.jarurl=false +dist.dir=dist/${config.active} +dist.jad=geoc.jad +dist.jar=geoc.jar +dist.javadoc.dir=${dist.dir}/doc +dist.root.dir=dist +filter.exclude.tests=false +filter.excludes= +filter.use.standard=true +jar.compress=true +javac.debug=true +javac.deprecation=false +javac.encoding=ANSI_X3.4-1968 +javac.optimize=false +javac.source=1.3 +javac.target=1.1 +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +libs.classpath=${libs.NetBeans MIDP Components.classpath} +manifest.apipermissions= +manifest.jad= +manifest.manifest= +manifest.midlets=MIDlet-1: geoc,,gui.geoc\n +manifest.others=MIDlet-Vendor: manut.de\nMIDlet-Version: 0.1\nMIDlet-Name: geoc\n +manifest.pushregistry= +name=geoc +no.dependencies=false +obfuscated.classes.dir=${build.dir}/obfuscated +obfuscation.custom= +obfuscation.level=0 +obfuscator.destjar=${build.dir}/obfuscated.jar +obfuscator.srcjar=${build.dir}/before-obfuscation.jar +platform.active=Sun_Java_TM__Wireless_Toolkit_2_5_1_for_CLDC +platform.active.description=Sun Java(TM) Wireless Toolkit 2.5.1 for CLDC +platform.apis=JSR234-1.0,SATSA-APDU-1.0,JSR211-1.0,JSR75-1.0,J2ME-WS-1.0,JSR172-1.0,J2ME-XMLRPC-1.0,JSR82-1.1,SATSA-JCRMI-1.0,SATSA-CRYPTO-1.0,JSR239-1.0,JSR179-1.0.1,JSR184-1.1,JSR238-1.0,MMAPI-1.1,OBEX-1.0,JSR229-1.1.0,SATSA-PKI-1.0,JSR180-1.0.1,JSR226-1.0,JSR177-1.0,WMA-2.0 +platform.bootclasspath=${platform.home}/lib/wma20.jar:${platform.home}/lib/jsr082.jar:${platform.home}/lib/j2me-xmlrpc.jar:${platform.home}/lib/satsa-jcrmi.jar:${platform.home}/lib/satsa-apdu.jar:${platform.home}/lib/satsa-crypto.jar:${platform.home}/lib/jsr179.jar:${platform.home}/lib/satsa-pki.jar:${platform.home}/lib/jsr75.jar:${platform.home}/lib/jsr180.jar:${platform.home}/lib/jsr238.jar:${platform.home}/lib/jsr229.jar:${platform.home}/lib/j2me-ws.jar:${platform.home}/lib/jsr234.jar:${platform.home}/lib/jsr226.jar:${platform.home}/lib/jsr184.jar:${platform.home}/lib/mmapi.jar:${platform.home}/lib/jsr239.jar:${platform.home}/lib/jsr211.jar:${platform.home}/lib/cldcapi11.jar:${platform.home}/lib/midpapi20.jar +platform.configuration=CLDC-1.1 +platform.device=DefaultColorPhone +platform.profile=MIDP-2.0 +preprocessed.dir=${build.dir}/preprocessed +preverify.classes.dir=${build.dir}/preverified +run.cmd.options= +run.method=STANDARD +run.security.domain=trusted +run.use.security.domain=false +sign.alias= +sign.enabled=false +sign.keystore= +src.dir=src +use.emptyapis=true diff --git a/trunk/nbproject/project.xml b/trunk/nbproject/project.xml new file mode 100755 index 0000000..ef09392 --- /dev/null +++ b/trunk/nbproject/project.xml @@ -0,0 +1,10 @@ + + + org.netbeans.modules.kjava.j2meproject + + + geoc + 1.6 + + + diff --git a/trunk/src/gui/geoc.java b/trunk/src/gui/geoc.java new file mode 100755 index 0000000..ba54077 --- /dev/null +++ b/trunk/src/gui/geoc.java @@ -0,0 +1,469 @@ +/* + * geoc.java + * + * Created on July 14, 2007, 1:29 AM + */ + +package gui; + +import javax.microedition.midlet.*; +import javax.microedition.lcdui.*; +import javax.microedition.location.LocationException; +import java.util.Timer; +import nav.*; + +/** + * + * @author manut + */ +public class geoc extends MIDlet implements CommandListener { + + private navigate nav; + + /** + * Creates a new instance of geoc + */ + public geoc() { + + try { + + nav = new navigate(this); + + } catch (LocationException e) { + + this.get_stringItemHead1().setText("no GPS!/n"); + + } + } + + private Form editForm;//GEN-BEGIN:MVDFields + private StringItem stringItemHead1; + private Command exitCommand; + private TextField textFieldEnterNorth; + private TextField textFieldEnterEast; + private Spacer spacer1; + private StringItem stringItemEnterDest; + private Command screenCommand1; + private Command exitCommand1; + private Command exitCommand2; + private Command itemCommand1; + private Command itemCommand2; + private Form navForm; + private Command exitCommand3; + private Command exitCommand4; + private Command screenCommand2; + private StringItem stringItemHead2; + private Spacer spacer2; + private StringItem stringItemCourse; + private StringItem stringItemDistance; + private StringItem stringItemActNorth; + private StringItem stringItemActEast; + private StringItem stringItemActHeight; + private StringItem stringItemDestination; + private StringItem stringItemDestNorth; + private StringItem stringItemDestEast; + private Command okCommand1;//GEN-END:MVDFields + +//GEN-LINE:MVDMethods + + /** This method initializes UI of the application.//GEN-BEGIN:MVDInitBegin + */ + private void initialize() {//GEN-END:MVDInitBegin + // Insert pre-init code here + navForm = new Form(null, new Item[] {//GEN-BEGIN:MVDInitInit + get_stringItemHead2(), + get_spacer2(), + get_stringItemCourse(), + get_stringItemDistance(), + get_stringItemActNorth(), + get_stringItemActEast(), + get_stringItemActHeight(), + get_stringItemDestination(), + get_stringItemDestNorth(), + get_stringItemDestEast() + }); + navForm.addCommand(get_exitCommand4()); + navForm.addCommand(get_screenCommand2()); + navForm.setCommandListener(this); + editForm = new Form(null, new Item[] { + get_stringItemHead1(), + get_spacer1(), + get_stringItemEnterDest(), + get_textFieldEnterNorth(), + get_textFieldEnterEast() + }); + editForm.addCommand(get_exitCommand()); + editForm.addCommand(get_okCommand1()); + editForm.setCommandListener(this); + getDisplay().setCurrent(editForm);//GEN-END:MVDInitInit + // Insert post-init code here + }//GEN-LINE:MVDInitEnd + + /** Called by the system to indicate that a command has been invoked on a particular displayable.//GEN-BEGIN:MVDCABegin + * @param command the Command that ws invoked + * @param displayable the Displayable on which the command was invoked + */ + public void commandAction(Command command, Displayable displayable) {//GEN-END:MVDCABegin + // Insert global pre-action code here + if (displayable == editForm) {//GEN-BEGIN:MVDCABody + if (command == exitCommand) {//GEN-END:MVDCABody + // Insert pre-action code here + exitMIDlet();//GEN-LINE:MVDCAAction3 + // Insert post-action code here at gui.geoc.(geoc.java:34) + } else if (command == okCommand1) {//GEN-LINE:MVDCACase3 + // Insert pre-action code here + javax.microedition.lcdui.Alert al = new javax.microedition.lcdui.Alert("Error"); + al.setString("Coord. parsing failed\nor no gps!"); + try { + nav.setDestination(get_textFieldEnterNorth().getString(), get_textFieldEnterEast().getString()); + } catch(Exception ae) { + getDisplay().setCurrent(al, navForm); + } + getDisplay().setCurrent(navForm); + /* +getDisplay ().setCurrent (navForm);//GEN-LINE:MVDCAAction43 + // Iert post-action code here + */ + }//GEN-BEGIN:MVDCACase43 + } else if (displayable == navForm) { + if (command == exitCommand4) {//GEN-END:MVDCACase43 + // Insert pre-action code here + exitMIDlet();//GEN-LINE:MVDCAAction24 + // Insert post-action code here + } else if (command == screenCommand2) {//GEN-LINE:MVDCACase24 + // Insert pre-action code here + getDisplay().setCurrent(editForm);//GEN-LINE:MVDCAAction26 + // Insert post-action code here + }//GEN-BEGIN:MVDCACase26 + }//GEN-END:MVDCACase26 + // Insert global post-action code here +}//GEN-LINE:MVDCAEnd + + /** + * This method should return an instance of the display. + */ + public Display getDisplay() {//GEN-FIRST:MVDGetDisplay + return Display.getDisplay(this); + }//GEN-LAST:MVDGetDisplay + + /** + * This method should exit the midlet. + */ + public void exitMIDlet() {//GEN-FIRST:MVDExitMidlet + getDisplay().setCurrent(null); + destroyApp(true); + notifyDestroyed(); + }//GEN-LAST:MVDExitMidlet + + + /** This method returns instance for stringItemHead1 component and should be called instead of accessing stringItemHead1 field directly.//GEN-BEGIN:MVDGetBegin4 + * @return Instance for stringItemHead1 component + */ + public StringItem get_stringItemHead1() { + if (stringItemHead1 == null) {//GEN-END:MVDGetBegin4 + // Insert pre-init code here + stringItemHead1 = new StringItem("geoc", "v0.1");//GEN-LINE:MVDGetInit4 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd4 + return stringItemHead1; + }//GEN-END:MVDGetEnd4 + + /** This method returns instance for exitCommand component and should be called instead of accessing exitCommand field directly.//GEN-BEGIN:MVDGetBegin5 + * @return Instance for exitCommand component + */ + public Command get_exitCommand() { + if (exitCommand == null) {//GEN-END:MVDGetBegin5 + // Insert pre-init code here + exitCommand = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit5 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd5 + return exitCommand; + }//GEN-END:MVDGetEnd5 + + /** This method returns instance for textFieldEnterNorth component and should be called instead of accessing textFieldEnterNorth field directly.//GEN-BEGIN:MVDGetBegin6 + * @return Instance for textFieldEnterNorth component + */ + public TextField get_textFieldEnterNorth() { + if (textFieldEnterNorth == null) {//GEN-END:MVDGetBegin6 + // Insert pre-init code here + textFieldEnterNorth = new TextField("North", "47:42.466", 120, TextField.ANY);//GEN-LINE:MVDGetInit6 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd6 + return textFieldEnterNorth; + }//GEN-END:MVDGetEnd6 + + /** This method returns instance for textFieldEnterEast component and should be called instead of accessing textFieldEnterEast field directly.//GEN-BEGIN:MVDGetBegin7 + * @return Instance for textFieldEnterEast component + */ + public TextField get_textFieldEnterEast() { + if (textFieldEnterEast == null) {//GEN-END:MVDGetBegin7 + // Insert pre-init code here + textFieldEnterEast = new TextField("East", "9:36.620", 120, TextField.ANY);//GEN-LINE:MVDGetInit7 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd7 + return textFieldEnterEast; + }//GEN-END:MVDGetEnd7 + + /** This method returns instance for spacer1 component and should be called instead of accessing spacer1 field directly.//GEN-BEGIN:MVDGetBegin9 + * @return Instance for spacer1 component + */ + public Spacer get_spacer1() { + if (spacer1 == null) {//GEN-END:MVDGetBegin9 + // Insert pre-init code here + spacer1 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit9 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd9 + return spacer1; + }//GEN-END:MVDGetEnd9 + + /** This method returns instance for stringItemEnterDest component and should be called instead of accessing stringItemEnterDest field directly.//GEN-BEGIN:MVDGetBegin10 + * @return Instance for stringItemEnterDest component + */ + public StringItem get_stringItemEnterDest() { + if (stringItemEnterDest == null) {//GEN-END:MVDGetBegin10 + // Insert pre-init code here + stringItemEnterDest = new StringItem("\nEnter Destination", "");//GEN-LINE:MVDGetInit10 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd10 + return stringItemEnterDest; + }//GEN-END:MVDGetEnd10 + + /** This method returns instance for screenCommand1 component and should be called instead of accessing screenCommand1 field directly.//GEN-BEGIN:MVDGetBegin11 + * @return Instance for screenCommand1 component + */ + public Command get_screenCommand1() { + if (screenCommand1 == null) {//GEN-END:MVDGetBegin11 + // Insert pre-init code here + screenCommand1 = new Command("go to", Command.SCREEN, 1);//GEN-LINE:MVDGetInit11 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd11 + return screenCommand1; + }//GEN-END:MVDGetEnd11 + + /** This method returns instance for exitCommand1 component and should be called instead of accessing exitCommand1 field directly.//GEN-BEGIN:MVDGetBegin15 + * @return Instance for exitCommand1 component + */ + public Command get_exitCommand1() { + if (exitCommand1 == null) {//GEN-END:MVDGetBegin15 + // Insert pre-init code here + exitCommand1 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit15 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd15 + return exitCommand1; + }//GEN-END:MVDGetEnd15 + + /** This method returns instance for exitCommand2 component and should be called instead of accessing exitCommand2 field directly.//GEN-BEGIN:MVDGetBegin16 + * @return Instance for exitCommand2 component + */ + public Command get_exitCommand2() { + if (exitCommand2 == null) {//GEN-END:MVDGetBegin16 + // Insert pre-init code here + exitCommand2 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit16 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd16 + return exitCommand2; + }//GEN-END:MVDGetEnd16 + + /** This method returns instance for itemCommand1 component and should be called instead of accessing itemCommand1 field directly.//GEN-BEGIN:MVDGetBegin18 + * @return Instance for itemCommand1 component + */ + public Command get_itemCommand1() { + if (itemCommand1 == null) {//GEN-END:MVDGetBegin18 + // Insert pre-init code here + itemCommand1 = new Command("Item", Command.ITEM, 1);//GEN-LINE:MVDGetInit18 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd18 + return itemCommand1; + }//GEN-END:MVDGetEnd18 + + /** This method returns instance for itemCommand2 component and should be called instead of accessing itemCommand2 field directly.//GEN-BEGIN:MVDGetBegin19 + * @return Instance for itemCommand2 component + */ + public Command get_itemCommand2() { + if (itemCommand2 == null) {//GEN-END:MVDGetBegin19 + // Insert pre-init code here + itemCommand2 = new Command("Edit Coord.", Command.ITEM, 1);//GEN-LINE:MVDGetInit19 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd19 + return itemCommand2; + }//GEN-END:MVDGetEnd19 + + /** This method returns instance for exitCommand3 component and should be called instead of accessing exitCommand3 field directly.//GEN-BEGIN:MVDGetBegin22 + * @return Instance for exitCommand3 component + */ + public Command get_exitCommand3() { + if (exitCommand3 == null) {//GEN-END:MVDGetBegin22 + // Insert pre-init code here + exitCommand3 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit22 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd22 + return exitCommand3; + }//GEN-END:MVDGetEnd22 + + /** This method returns instance for exitCommand4 component and should be called instead of accessing exitCommand4 field directly.//GEN-BEGIN:MVDGetBegin23 + * @return Instance for exitCommand4 component + */ + public Command get_exitCommand4() { + if (exitCommand4 == null) {//GEN-END:MVDGetBegin23 + // Insert pre-init code here + exitCommand4 = new Command("Exit", Command.EXIT, 1);//GEN-LINE:MVDGetInit23 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd23 + return exitCommand4; + }//GEN-END:MVDGetEnd23 + + /** This method returns instance for screenCommand2 component and should be called instead of accessing screenCommand2 field directly.//GEN-BEGIN:MVDGetBegin25 + * @return Instance for screenCommand2 component + */ + public Command get_screenCommand2() { + if (screenCommand2 == null) {//GEN-END:MVDGetBegin25 + // Insert pre-init code here + screenCommand2 = new Command("edit Coord.", Command.SCREEN, 1);//GEN-LINE:MVDGetInit25 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd25 + return screenCommand2; + }//GEN-END:MVDGetEnd25 + + /** This method returns instance for stringItemHead2 component and should be called instead of accessing stringItemHead2 field directly.//GEN-BEGIN:MVDGetBegin27 + * @return Instance for stringItemHead2 component + */ + public StringItem get_stringItemHead2() { + if (stringItemHead2 == null) {//GEN-END:MVDGetBegin27 + // Insert pre-init code here + stringItemHead2 = new StringItem("geoc", "v0.1");//GEN-LINE:MVDGetInit27 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd27 + return stringItemHead2; + }//GEN-END:MVDGetEnd27 + + /** This method returns instance for spacer2 component and should be called instead of accessing spacer2 field directly.//GEN-BEGIN:MVDGetBegin28 + * @return Instance for spacer2 component + */ + public Spacer get_spacer2() { + if (spacer2 == null) {//GEN-END:MVDGetBegin28 + // Insert pre-init code here + spacer2 = new Spacer(1000, 1);//GEN-LINE:MVDGetInit28 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd28 + return spacer2; + }//GEN-END:MVDGetEnd28 + + /** This method returns instance for stringItemCourse component and should be called instead of accessing stringItemCourse field directly.//GEN-BEGIN:MVDGetBegin29 + * @return Instance for stringItemCourse component + */ + public StringItem get_stringItemCourse() { + if (stringItemCourse == null) {//GEN-END:MVDGetBegin29 + // Insert pre-init code here + stringItemCourse = new StringItem("\nCourse", "0");//GEN-LINE:MVDGetInit29 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd29 + return stringItemCourse; + }//GEN-END:MVDGetEnd29 + + /** This method returns instance for stringItemDistance component and should be called instead of accessing stringItemDistance field directly.//GEN-BEGIN:MVDGetBegin34 + * @return Instance for stringItemDistance component + */ + public StringItem get_stringItemDistance() { + if (stringItemDistance == null) {//GEN-END:MVDGetBegin34 + // Insert pre-init code here + stringItemDistance = new StringItem("Distance", "0");//GEN-LINE:MVDGetInit34 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd34 + return stringItemDistance; + }//GEN-END:MVDGetEnd34 + + /** This method returns instance for stringItemActNorth component and should be called instead of accessing stringItemActNorth field directly.//GEN-BEGIN:MVDGetBegin35 + * @return Instance for stringItemActNorth component + */ + public StringItem get_stringItemActNorth() { + if (stringItemActNorth == null) {//GEN-END:MVDGetBegin35 + // Insert pre-init code here + stringItemActNorth = new StringItem("\nNorth", "0");//GEN-LINE:MVDGetInit35 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd35 + return stringItemActNorth; + }//GEN-END:MVDGetEnd35 + + /** This method returns instance for stringItemActEast component and should be called instead of accessing stringItemActEast field directly.//GEN-BEGIN:MVDGetBegin36 + * @return Instance for stringItemActEast component + */ + public StringItem get_stringItemActEast() { + if (stringItemActEast == null) {//GEN-END:MVDGetBegin36 + // Insert pre-init code here + stringItemActEast = new StringItem("East", "0");//GEN-LINE:MVDGetInit36 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd36 + return stringItemActEast; + }//GEN-END:MVDGetEnd36 + + /** This method returns instance for stringItemActHeight component and should be called instead of accessing stringItemActHeight field directly.//GEN-BEGIN:MVDGetBegin37 + * @return Instance for stringItemActHeight component + */ + public StringItem get_stringItemActHeight() { + if (stringItemActHeight == null) {//GEN-END:MVDGetBegin37 + // Insert pre-init code here + stringItemActHeight = new StringItem("Height", "0");//GEN-LINE:MVDGetInit37 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd37 + return stringItemActHeight; + }//GEN-END:MVDGetEnd37 + + /** This method returns instance for stringItemDestination component and should be called instead of accessing stringItemDestination field directly.//GEN-BEGIN:MVDGetBegin38 + * @return Instance for stringItemDestination component + */ + public StringItem get_stringItemDestination() { + if (stringItemDestination == null) {//GEN-END:MVDGetBegin38 + // Insert pre-init code here + stringItemDestination = new StringItem("\nDestination", "");//GEN-LINE:MVDGetInit38 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd38 + return stringItemDestination; + }//GEN-END:MVDGetEnd38 + + /** This method returns instance for stringItemDestNorth component and should be called instead of accessing stringItemDestNorth field directly.//GEN-BEGIN:MVDGetBegin40 + * @return Instance for stringItemDestNorth component + */ + public StringItem get_stringItemDestNorth() { + if (stringItemDestNorth == null) {//GEN-END:MVDGetBegin40 + // Insert pre-init code here + stringItemDestNorth = new StringItem("North", "0");//GEN-LINE:MVDGetInit40 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd40 + return stringItemDestNorth; + }//GEN-END:MVDGetEnd40 + + /** This method returns instance for stringItemDestEast component and should be called instead of accessing stringItemDestEast field directly.//GEN-BEGIN:MVDGetBegin41 + * @return Instance for stringItemDestEast component + */ + public StringItem get_stringItemDestEast() { + if (stringItemDestEast == null) {//GEN-END:MVDGetBegin41 + // Insert pre-init code here + stringItemDestEast = new StringItem("East", "0");//GEN-LINE:MVDGetInit41 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd41 + return stringItemDestEast; + }//GEN-END:MVDGetEnd41 + + /** This method returns instance for okCommand1 component and should be called instead of accessing okCommand1 field directly.//GEN-BEGIN:MVDGetBegin42 + * @return Instance for okCommand1 component + */ + public Command get_okCommand1() { + if (okCommand1 == null) {//GEN-END:MVDGetBegin42 + // Insert pre-init code here + okCommand1 = new Command("goto", Command.OK, 1);//GEN-LINE:MVDGetInit42 + // Insert post-init code here + }//GEN-BEGIN:MVDGetEnd42 + return okCommand1; + }//GEN-END:MVDGetEnd42 + + public void startApp() { + initialize(); + } + + public void pauseApp() { + } + + public void destroyApp(boolean unconditional) { + } + +} diff --git a/trunk/src/gui/geoc.mvd b/trunk/src/gui/geoc.mvd new file mode 100755 index 0000000..fe0f961 --- /dev/null +++ b/trunk/src/gui/geoc.mvd @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/src/nav/locListener.java b/trunk/src/nav/locListener.java new file mode 100755 index 0000000..54ff7db --- /dev/null +++ b/trunk/src/nav/locListener.java @@ -0,0 +1,35 @@ +/* + * locListener.java + * + * Created on July 14, 2007, 4:20 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import javax.microedition.location.*; + +/** + * + * @author manut + */ +public class locListener implements LocationListener { + + private navigate nav; + + /** Creates a new instance of locListener */ + public locListener(navigate _nav) { + nav = _nav; + } + + public void providerStateChanged(LocationProvider prov, int newState){ + nav.setNewState(newState); + } + + public void locationUpdated(LocationProvider prov, Location location){ + nav.setNewLoc(location); + } + +} diff --git a/trunk/src/nav/navigate.java b/trunk/src/nav/navigate.java new file mode 100755 index 0000000..eeaffce --- /dev/null +++ b/trunk/src/nav/navigate.java @@ -0,0 +1,93 @@ +/* + * navigate.java + * + * Created on July 14, 2007, 2:18 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import javax.microedition.location.*; +import gui.geoc; +import java.lang.Thread; + +/** + * + * @author manut + */ +public class navigate { + + private geoc gui; + private LocationProvider pos; + private int provState; + + private Location actLoc; + private Landmark dest; + + private processLoc pLoc; + private processState pState; + + /** Creates a new instance of navigate */ + public navigate(geoc _gui) throws LocationException { + + pos = LocationProvider.getInstance(null); + if (pos == null) + throw new LocationException(); + + gui = _gui; + pLoc = new processLoc(gui); + pState = new processState(gui); + } + + /** sets destination */ + public void setDestination ( String north, String east ) + throws IllegalArgumentException { + + double latitude, longitude; + float altitude, hAcc, vAcc; + + latitude = Coordinates.convert(north); + longitude = Coordinates.convert(east); + + altitude = Float.NaN; + hAcc = 0; + vAcc = 0; + + QualifiedCoordinates coord; + coord = new QualifiedCoordinates( latitude, + longitude, + altitude, hAcc, vAcc + ); + + if(dest == null){ + AddressInfo info = new AddressInfo(); + dest = new Landmark("destination", "stageX", coord, info); + } else + dest.setQualifiedCoordinates(coord); + + + locListener locList = new locListener(this); + int interval = -1; + + gui.get_stringItemDestNorth().setText(north); + gui.get_stringItemDestEast().setText(east); + + pos.setLocationListener(locList, interval, 0, 0); + + } + + public void setNewLoc(Location loc){ + actLoc = loc; + pLoc.set(loc, dest); + pLoc.run(); + } + + public void setNewState(int state){ + provState = state; + pState.set(state); + pState.run(); + } + +} diff --git a/trunk/src/nav/processLoc.java b/trunk/src/nav/processLoc.java new file mode 100755 index 0000000..fdcd863 --- /dev/null +++ b/trunk/src/nav/processLoc.java @@ -0,0 +1,104 @@ +/* + * processLoc.java + * + * Created on July 14, 2007, 4:59 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import java.lang.Thread; +import javax.microedition.location.*; + +import gui.*; + +/** + * + * @author manut + */ +public class processLoc extends Thread { + + private geoc gui; + private Landmark dest; + private Location loc; + private Coordinates lastloc; + private Coordinates north; + + /** Creates a new instance of processLoc */ + public processLoc(geoc _gui) { + gui = _gui; + north = new Coordinates(90, 0, 0); + lastloc = null; + } + + public void set(Location _loc, Landmark _dest){ + + loc = _loc; + dest = _dest; + + } + + private double arcsin(double azimuth){ + double calc; + double last_calc = 0; + + for(double i = -1; i <= 1; i=i+0.001){ + calc = java.lang.Math.sin(i); + if ( calc == azimuth ){ + return i; + } else if (last_calc <= azimuth && calc > azimuth){ + return i; + } else + last_calc = calc; + } + return -2; + } + + public void run(){ + // calc course, distance + // A = LastPosition + // B = Destination + // C = Northpole + // D = ActPosition + // E = going further on straight forward, until you meet BC + // + // alphaI = arcsin( ( CD * sin(gammaI) ) / AB ) + // betaI = arcsin( ( CD * sin(gammaII)) / BD ) + // deltaI = 180 - alphaI - gammaI + // deltaII = 180 - deltaI + // epsilI = 180 - deltaII - gammaII + // epsilII = 180 - epsilI + // gesucht = 180 - epsilII - betaI + // --> courseCorrection = - 180 - arcsin( (CD * sin(gammaI)) / AB ) - gammaI - gammaII - arcsin( CD * (sin(gammaII)) / BD ) + + if( (lastloc!= null) && loc.isValid()) + { + + float gammaI = lastloc.azimuthTo(loc.getQualifiedCoordinates()); + float gammaII = loc.getQualifiedCoordinates().azimuthTo(dest.getQualifiedCoordinates()); + float AB = lastloc.distance(dest.getQualifiedCoordinates()); + float BD = loc.getQualifiedCoordinates().distance(dest.getQualifiedCoordinates()); + float CD = loc.getQualifiedCoordinates().distance(north); + + double actC = ( - 180 - arcsin( (CD * java.lang.Math.sin(gammaI)) / AB ) - gammaI - gammaII - arcsin( CD * (java.lang.Math.sin(gammaII)) / BD ) ) % 360; + int actCourse = (int) actC; + if (actCourse < 0) + actCourse = actCourse+360; + + // set GUI + gui.get_stringItemActNorth().setText(Coordinates.convert(loc.getQualifiedCoordinates().getLatitude(), 2)); + gui.get_stringItemActEast().setText(Coordinates.convert(loc.getQualifiedCoordinates().getLongitude(), 2)); + gui.get_stringItemActHeight().setText(String.valueOf(loc.getQualifiedCoordinates().getAltitude())); + if ( (actCourse != 112) ) + gui.get_stringItemCourse().setText(String.valueOf(actCourse)); + gui.get_stringItemDistance().setText(String.valueOf(BD)); + + } + + if ( loc.isValid() ) + lastloc = loc.getQualifiedCoordinates(); + } + +} diff --git a/trunk/src/nav/processState.java b/trunk/src/nav/processState.java new file mode 100755 index 0000000..9c7d756 --- /dev/null +++ b/trunk/src/nav/processState.java @@ -0,0 +1,50 @@ +/* + * processState.java + * + * Created on July 14, 2007, 5:02 PM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package nav; + +import gui.*; +import java.lang.Thread; +import javax.microedition.location.*; + +/** + * + * @author manut + */ +public class processState extends Thread{ + + private geoc gui; + private int state; + + /** Creates a new instance of processState */ + public processState(geoc _gui) { + gui = _gui; + } + + public void set(int _state){ + state = _state; + } + + public void run(){ + switch(state){ + case LocationProvider.AVAILABLE: + gui.get_stringItemHead2().setLabel("GPS available"); + break; + case LocationProvider.OUT_OF_SERVICE: + gui.get_stringItemHead2().setLabel("no GPS!"); + break; + case LocationProvider.TEMPORARILY_UNAVAILABLE: + gui.get_stringItemHead2().setLabel("weak GPS signal"); + break; + default: + gui.get_stringItemHead2().setLabel("Location API Error"); + } + } + +} -- cgit v1.2.3