/** InfoForm.java
*
* Created on 2007-9-20, 15:10:02
*
* To change this template, choose Tools | Templates
* and open the template in the editor.*/packagecom.hadeslee.phone;importjavax.microedition.lcdui.Alert;importjavax.microedition.lcdui.AlertType;importjavax.microedition.lcdui.Command;importjavax.microedition.lcdui.CommandListener;importjavax.microedition.lcdui.Displayable;importjavax.microedition.lcdui.Form;importjavax.microedition.lcdui.StringItem;importjavax.microedition.lcdui.Ticker;/***
*@authorhadeslee*/publicclassInfoFormextendsFormimplementsCommandListener {privateMain main;privateCommand about;privateCommand exit;publicInfoForm(Main main) {super("配置表");this.main=main;
initOther();
}//初始化其它privatevoidinitOther() {
about=newCommand("关于", Command.OK,1);
exit=newCommand("退出", Command.EXIT,1);this.addCommand(about);this.addCommand(exit);this.setCommandListener(this);this.setTicker(newTicker("手机JAVA平台参数查看"));
initStringItem();
}//初始化字符串项privatevoidinitStringItem() {
String[] keys={"手机平台","手机编码","配置","简表","地区","主机名"};
String[] values={"microedition.platform","microedition.encoding","microedition.configuration","microedition.profiles","microedition.locale","microedition.hostname"};for(inti=0; i
StringItem item=newStringItem(keys[i], System.getProperty(values[i]));this.append(item);
}
}publicvoidcommandAction(Command c, Displayable d) {if(c==about) {
main.getDisplay().setCurrent(newAlert("关于\n","查看手机的一些JAVA配置\n作者:千里冰封",null,AlertType.INFO),this);
}elseif(c==exit) {
main.notifyDestroyed();
main.destroyApp(true);
}
}
}