📄 mainmenuui.java
字号:
/*
* MainMenuUI.java
*
* Created on 2005年11月1日, 下午5:00
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package com.j2medev.ch5.post.ui;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;
/**
*
* @author Administrator
*/
public class MainMenuUI extends List implements CommandListener {
private UIController controller = null;
/** Creates a new instance of MainMenuUI */
public MainMenuUI(UIController controller) {
super("主菜单",List.IMPLICIT);
this.controller = controller;
this.append("发表文章", null);
this.append("阅读文章", null);
this.setCommandListener(this);
}
public void commandAction(Command cmd,Displayable displayable){
if(cmd == List.SELECT_COMMAND){
String label = this.getString(getSelectedIndex());
if(label.equals("发表文章")){
controller.handleEvent(UIController.EventID.MAIN_POST_ARTICLE, null);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -