8,10 → 8,13 |
* |
************************************************************************/ |
|
|
import javax.microedition.lcdui.*; |
import javax.microedition.midlet.*; |
|
//#if j2memap=="on" |
import com.eightmotions.map.MapDisplay; |
import com.eightmotions.util.UtilMidp; |
//#endif |
public class DUBwise |
extends MIDlet |
|
29,22 → 32,53 |
display.vibrate(duration); |
} |
|
//#if j2memap=="on" |
MapDisplay m_map; |
Canvas map_canvas; |
//#endif |
|
protected void startApp() |
throws MIDletStateChangeException |
{ |
if (loaded) |
{ |
System.out.println("app already loaded"); |
display.setCurrent(canvas); |
return; // when allready done -> do not do it again |
} |
|
if (loaded)return; |
display = Display.getDisplay(this); |
canvas=new DUBwiseCanvas(this); |
// m_map.init(); |
// Display.getDisplay(this).setCurrent(m_map.getCanvas()); |
|
// fire up canvas |
display.setCurrent(canvas); |
loaded=true; |
//#if j2memap=="on" |
UtilMidp.checkMIDP(this); //Initialise the utility library... |
m_map=new MapDisplay(); |
m_map.setModeProxy(true); |
map_canvas=m_map.getCanvas(); |
//#endif |
|
display = Display.getDisplay(this); |
canvas=new DUBwiseCanvas(this); |
|
// fire up canvas |
display.setCurrent(canvas); |
loaded=true; |
// System.out.println("DUBwise start done"); |
} |
|
|
public void quit() { notifyDestroyed(); } |
protected void pauseApp() {} // not needed right now |
protected void destroyApp(boolean arg0) { } |
public void quit() { |
destroyApp(true); |
notifyDestroyed(); |
} |
protected void pauseApp() { |
quit(); |
System.out.println("app paused"); |
} |
|
protected void destroyApp(boolean arg0) |
{ |
|
} |
|
} |