detailforeshowinfoform.java

来自「手机在线系统 采用Java 中的J2ME, JSP 跟MySql 运行环」· Java 代码 · 共 73 行

JAVA
73
字号
/*
 * @(#)DetailForeshowInfoForm.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 DetailForeshowInfoForm	extends Form implements CommandListener
{
	private Display display;
	/*赛程列表类*/
	private ForeshowList forse;

	/*赛程搜索类*/
	private SearchForeshowForm search;

	/*错误类*/
	private Alert errorAlert = null;
	public Command backCommand = null;			//定义离开软键

	/*-------------------------------------------------------------------
	 *初始化
	 */
	public DetailForeshowInfoForm(String title, Image image, String info, Display display, ForeshowList forse, SearchForeshowForm search)
	{
		super(title);
		this.display = display;
		this.forse = forse;
		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 void commandAction(Command c,Displayable s)
	{
		if(c == backCommand)
		{	
			if (search == null)
			{	
				this.display.setCurrent(forse);
			}
			if (forse == null)
			{	 
				this.display.setCurrent(search);			
			}							
		}
	}

}



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?