10f084280152001f185d87389a1c119f
上传用户:anders
上传日期:2022-07-15
资源大小:376k
文件大小:1k
- package phoneLeter;
- import javax.microedition.lcdui.CommandListener;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.List;
- import javax.microedition.lcdui.Command;
- public class phoneList extends List implements CommandListener{
- private Command cmdBack=new Command("返回",Command.BACK,1);
- private Command cmdAdd=new Command("添加电话",Command.SCREEN,1);
- private Command cmdDel=new Command("删除电话",Command.SCREEN,1);
- private phoneMIDlet pm;
-
- public phoneList(phoneMIDlet pm) {
- super("通讯录",List.IMPLICIT);
- this.pm=pm;
- this.addCommand(cmdBack);
- this.addCommand(cmdAdd);
- this.addCommand(cmdDel);
- this.setCommandListener(this);
- }
- public void commandAction(Command arg0, Displayable arg1) {
- if(arg0==cmdBack)
- {
- //返回欢迎界面
- pm.changeInterface("WelcomeCanvas");
- }
- else if(arg0==cmdAdd)
- {
- //添加电话界面
- pm.changeInterface("addPhone");
- }
- else if(arg0==cmdDel)
- {
- //删除电话
- }
-
- }
- }