Subversion Repositories Projects

Rev

Rev 221 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 221 Rev 382
Line 6... Line 6...
6
 * Author:        Marcus -LiGi- Bueschleb
6
 * Author:        Marcus -LiGi- Bueschleb
7
 * Mailto:        LiGi @at@ LiGi DOTT de                    
7
 * Mailto:        LiGi @at@ LiGi DOTT de                    
8
 *
8
 *
9
 ************************************************************************/
9
 ************************************************************************/
Line 10... Line -...
10
 
-
 
11
 
10
 
12
import javax.microedition.lcdui.*;
11
import javax.microedition.lcdui.*;
Line -... Line 12...
-
 
12
import javax.microedition.midlet.*;
-
 
13
 
-
 
14
//#if j2memap=="on"
-
 
15
import com.eightmotions.map.MapDisplay;
13
import javax.microedition.midlet.*;
16
import com.eightmotions.util.UtilMidp;
14
 
17
//#endif
Line 15... Line 18...
15
public class DUBwise
18
public class DUBwise
16
    extends MIDlet
19
    extends MIDlet
Line 27... Line 30...
27
    public void vibrate(int duration)
30
    public void vibrate(int duration)
28
    {
31
    {
29
        display.vibrate(duration);
32
        display.vibrate(duration);
30
    }
33
    }
Line -... Line 34...
-
 
34
 
-
 
35
//#if j2memap=="on"
-
 
36
    MapDisplay m_map;
-
 
37
    Canvas map_canvas;
-
 
38
//#endif      
31
 
39
 
32
    protected void startApp()
40
    protected void startApp()
33
        throws MIDletStateChangeException
41
        throws MIDletStateChangeException
-
 
42
    {
-
 
43
        if (loaded)
-
 
44
            {
-
 
45
                System.out.println("app already loaded");
-
 
46
                display.setCurrent(canvas);
-
 
47
                return; // when allready done -> do not do it again
-
 
48
            }
-
 
49
 
-
 
50
        //      m_map.init();
-
 
51
        // Display.getDisplay(this).setCurrent(m_map.getCanvas());
-
 
52
 
-
 
53
//#if j2memap=="on"
-
 
54
        UtilMidp.checkMIDP(this);  //Initialise the utility library...
-
 
55
        m_map=new MapDisplay();
-
 
56
        m_map.setModeProxy(true);
-
 
57
        map_canvas=m_map.getCanvas();
Line 34... Line -...
34
    {
-
 
35
 
58
//#endif      
36
       if (loaded)return;
59
 
Line 37... Line 60...
37
       display  = Display.getDisplay(this);
60
        display  = Display.getDisplay(this);
38
       canvas=new  DUBwiseCanvas(this);
61
        canvas=new  DUBwiseCanvas(this);
39
 
62
 
-
 
63
        // fire up canvas
40
       // fire up canvas
64
        display.setCurrent(canvas);
Line 41... Line 65...
41
       display.setCurrent(canvas);
65
        loaded=true;
-
 
66
        //      System.out.println("DUBwise start done");
-
 
67
    }
-
 
68
 
42
       loaded=true;
69
   
-
 
70
    public void quit() {
-
 
71
        destroyApp(true);
-
 
72
        notifyDestroyed();
-
 
73
    }
43
    }
74
    protected void pauseApp()     {
-
 
75
        quit();
-
 
76
        System.out.println("app paused");
-
 
77
    }  
Line 44... Line 78...
44
 
78