?? functionlist.java
字號:
package phone.function.list;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.List;
import phone.MainMIDlet;
import phone.function.secondWatch.StopwatchMain;
public class FunctionList extends List implements CommandListener {
private Display display;
private MainMIDlet mm;
private Command cmdBack, cmdOk;
public FunctionList(MainMIDlet mm, Display display) {
super("工具箱", List.IMPLICIT);
this.display = display;
this.mm = mm;
this.append("秒表", null);
this.append("計算器", null);
cmdBack = new Command("返回", Command.BACK, 1);
cmdOk = new Command("確定", Command.OK, 1);
this.addCommand(cmdBack);
this.addCommand(cmdOk);
this.setCommandListener(this);
}
public void getList() {
display.setCurrent(this);
}
public void commandAction(Command command, Displayable dis) {
if (command == cmdBack) {
mm.getList();
} else if (command == cmdOk) {
int index = this.getSelectedIndex();
switch (index) {
case 0:
StopwatchMain sm = new StopwatchMain(this, display);
display.setCurrent(sm);
break;
case 1:
;
break;
}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -