⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main_form.java

📁 手机理财软件
💻 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 + -