detailteaminfoform.java
来自「手机在线系统 采用Java 中的J2ME, JSP 跟MySql 运行环」· Java 代码 · 共 69 行
JAVA
69 行
/*
* @(#)DetailTeamInfoForm.java 1.11 01/08/23
* Copyright (c) 2004-2005 wuhua of workroom Inc. All Rights Reserved.
* @version 1.0, 10/05/2004
* @author 饶荣庆
* @author 余煜辉
*/
package com.j2me.football.england;
import javax.microedition.lcdui.*;
/**
*此类是球队的详细信息类
*/
public class DetailTeamInfoForm extends Form implements CommandListener
{
private Display display;
private TeamList team;
private SearchTermForm search;
private Alert errorAlert = null;
public Command backCommand = null; //定义离开软键
/*-------------------------------------------------------------------
*初始化
*/
public DetailTeamInfoForm(String title, Image image, String info, Display display, TeamList team, SearchTermForm search)
{
super(title);
this.display = display;
this.team = team;
this.search = search;
errorAlert = new Alert("ERROR", "连接网络失败 ", null, AlertType.ERROR);
try
{
this.append(image);
}
catch(NullPointerException e)
{
this.display.setCurrent(errorAlert);
System.out.println(e);
}
this.append(info);
this.backCommand = new Command("返回", Command.BACK, 2);
this.addCommand(backCommand);
this.setCommandListener(this);
}
/*public showForm(display,*/
public void commandAction(Command c,Displayable s)
{
if(c == backCommand)
{
if (search == null)
{
this.display.setCurrent(team);
}
if (team == null)
{
this.display.setCurrent(search);
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?