?? main_form.java
字號:
/** * <p>Title: CowriePixie</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: xidian</p> * @author yangyong * @version 1.0 */import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Display;import javax.microedition.lcdui.Displayable;import javax.microedition.lcdui.Item;import javax.microedition.lcdui.ItemStateListener;import javax.microedition.lcdui.List;import javax.microedition.midlet.MIDletStateChangeException;/* * 創建日期 2005-9-23 * * TODO 要更改此生成的文件的模板,請轉至 * 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板 *//** * @author Administrator * * TODO 要更改此生成的類型注釋的模板,請轉至 * 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板 * 程序的主界面:包裹所有軟件的進入功能.采用List */public class Main_Form extends List implements CommandListener, ItemStateListener { private Display dis; private Command ok; private Command exit; public Main_Form(Display display) { super("小貝精靈",List.IMPLICIT); dis = display; append(" 費用查詢", Financing.img[0]); append(" 費用錄入", Financing.img[1]); append(" 系統設置", Financing.img[2]); append(" 數據管理", Financing.img[3]); append(" 密碼設置", Financing.img[4]); append(" 使用指南", Financing.img[5]); ok = new Command("選擇", Command.OK, 2); addCommand(ok); exit = new Command("退出", Command.EXIT, 2); addCommand(exit); setCommandListener(this); } /** * @param string * @param image */ public void itemStateChanged(Item item1) { } public void commandAction(Command c, Displayable d) { if(c == exit) try { Financing.ExitApp(); } catch (MIDletStateChangeException e) { // TODO 自動生成 catch 塊 e.printStackTrace(); } if(c == ok) { int sel = getSelectedIndex(); switch(sel) { case 0: // '\0' Select_Date seldate = new Select_Date(dis); dis.setCurrent(seldate); break; case 1: // '\001' InputForm input = new InputForm(dis); dis.setCurrent(input); break; case 2: // '\002' Setup_Form setup = new Setup_Form(dis); dis.setCurrent(setup); break; case 3: // '\003' DataManager data = new DataManager(dis); dis.setCurrent(data); break; case 4: // '\004' SetPassword modify = new SetPassword(dis); dis.setCurrent(modify); break; case 5: // '\005' Help help = new Help(dis); dis.setCurrent(help); break; } } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -