?? merchantgroupdetailinfoui.java
字號:
package com.hziee.phone_book.ui;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;
public class MerchantGroupDetailInfoUI extends List implements CommandListener
{
private UIController uicontroller;
private int listNum = 0;
public static final Command backCommand = new Command("返回", Command.BACK, 1);
public MerchantGroupDetailInfoUI(UIController uicontroller)
{
super(Title.DETAIL_INFO, List.IMPLICIT);
this.uicontroller = uicontroller;
this.addCommand(backCommand);
this.setCommandListener(this);
}
public void init(String merchantGroupName)
{
if (listNum > 0)
{
deleteAll(listNum);
}
if(merchantGroupName.equals("海珠")){
this.append("好又多", null);
}else if(merchantGroupName.equals("天河")){
this.append("天河城", null);
this.append("家樂福", null);
}
listNum = size();
}
public void deleteAll(int listNum)
{
for (int i = listNum - 1; i >= 0; i--)
{
this.delete(i);
}
}
public void commandAction(Command arg0, Displayable arg1)
{
// TODO Auto-generated method stub
if (arg0 == backCommand)
{
uicontroller
.handleEvent(UIController.EventID.EVENT_DETAIL_BACK_MERCHANT_LIST);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -