📄 detailteaminfoform.java
字号:
/*
* @(#)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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -