diff options
Diffstat (limited to 'trunk/src/nav/processState.java')
| -rwxr-xr-x | trunk/src/nav/processState.java | 50 |
1 files changed, 50 insertions, 0 deletions
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"); + } + } + +} |
