📄 detailinfoform.java
字号:
/**
* @(#)DetailInfoForm.java
* Copyright (c) 2004-2005 wuhua of workroom Inc. All Rights Reserved.
* @version 1.0, 10/05/2004
* @author 饶荣庆
* @author
*/
package org.wuhua.photobook;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;
import org.wuhua.photobook.model.Friend;
/**
*此类是用来详细列出朋友信息并维护朋友信息
*/
public class DetailInfoForm extends Form implements CommandListener
{
private Display display = null;
private FriendList friendList = null;
public Command deleteCommand = null; //定义确定软键
public Command backCommand = null; //定义离开软键
public Command modifyCommand = null;
public StringItem addressItem = null;
public StringItem nameItem = null;
public StringItem phoneItem = null;
public StringItem eMailItem = null;
public DetailInfoForm(String s)
{
super(s);
this.backCommand = new Command("返回", Command.BACK, 2);
this.deleteCommand = new Command("删除", Command.BACK, 2);
this.modifyCommand = new Command("修改", Command.BACK, 2);
this.addressItem = new StringItem("ID:", null);
this.nameItem = new StringItem("姓名:", null);
this.phoneItem = new StringItem("电话:", null);
this.eMailItem = new StringItem("邮箱:", null);
this.addCommand(backCommand);
this.addCommand(deleteCommand);
this.addCommand(modifyCommand);
this.setCommandListener(this);
this.append(this.addressItem);
this.append(this.nameItem);
this.append(this.phoneItem);
this.append(this.eMailItem);
}
public void showForm(Display display, FriendList friendList)
{
this.display = display;
this.friendList = friendList;
this.display.setCurrent(this);
}
public void commandAction(Command c,Displayable s)
{
}
public void setFriend(Friend friend) {
this.addressItem.setText(friend.getAddress());
this.phoneItem.setText(friend.getPhone());
this.nameItem.setText(friend.getName());
this.eMailItem.setText(friend.getEmail());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -