📄 phonetest.java
字号:
/*
* Created on 2005-2-3
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package net.garrey.midlet;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Display;
import net.garrey.util.UIController;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class PhoneTest extends MIDlet {
private Display display;
private static UIController controller;
/**
* default constructor
*/
public PhoneTest() {
super();
display=Display.getDisplay(this);
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException {
controller=new UIController(this);
controller.init();//初始化RecordStore
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp() {
this.notifyPaused();
}
/* (non-Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
controller=null;
}
public void setCurrent(Displayable disp){
display.setCurrent(disp);
}
public void setCurrent(Alert alert, Displayable disp){
display.setCurrent(alert, disp);
}
public Displayable getCurrent(){
return display.getCurrent();
}
public void exit(boolean arg0){
try{
destroyApp(arg0);
notifyDestroyed();
}catch(MIDletStateChangeException e){
//
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -