⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 england.java

📁 手机在线系统 采用Java 中的J2ME, JSP 跟MySql 运行环境是:jsdk1.4以上
💻 JAVA
字号:
/*
 * @(#)England.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 com.j2me.main.*;
import com.j2me.common.*;
import com.j2me.football.*;
import com.j2me.language.*;
import javax.microedition.lcdui.*;

/**
 *类England是用来描述England足球功能菜单界面。
 */
public class  England extends List implements CommandListener
{
	private Display display = null;
	private MainFootballList footballList = null;

	/*新闻中心详细列表*/
	private NewsList newsList = null;

	/*赛程安排列表*/
	private Foreshow foreshow = null;

	/*球队列表*/
	public TeamMenuList team = null;

	/*射手榜列表*/
	public ShooterForm shooterForm = null;

	/*积分榜列表*/
	private PointForm pointForm = null;

	private Command backCommand = null;
	private Command okCommand = null;

	public Image[] icon = { createImage("/icon/phone.png"),createImage("/icon/football.png"), 
		                    createImage("/icon/music.png"),  createImage("/icon/dictionary.png"),
		                    createImage("/icon/english.png")};

	public  String [] stringMenu = {"最新赛况", "赛程安排" , "积分榜" , "射手耪", "球队信息"};
    
	/*初始话功能菜单*/
	public	England(String title)		  
	{
		super(title, List.IMPLICIT);    //继承超类,并设置属性为当选择是当前操作的项目在命令初始化时被选中
		append(stringMenu[0], icon[0]);
		append(stringMenu[1], icon[1]);
		append(stringMenu[2], icon[2]);
		append(stringMenu[3], icon[3]);
		append(stringMenu[4], icon[4]);
		this.backCommand = new Command("返回", Command.BACK, 2);
		this.okCommand = new Command("确定", Command.OK, 2);
		this.addCommand(backCommand);
		this.addCommand(okCommand);
		this.setCommandListener(this);
	}

	/*显示菜单界面方法*/
	public void showForm(Display display, MainFootballList footballList)	//用来显示界面
	{		
		this.display = display;
	   	this.footballList = footballList;
		this.display.setCurrent(this);
	}									 
	
	/*定义创建菜单图片的方法*/
	private Image createImage(String name)	 
	{
		Image aImage =null;
        try
		{ 
			aImage = Image.createImage(name);
		}
		catch(Exception e)
		{
			System.out.println("不能找到图片.");
		}
        return aImage;
     }

	 
	public void commandAction(Command c, Displayable s)
	{
		if(c == backCommand)
		{
			this.display.setCurrent(footballList);
		}
		else
		{
			int listIndex;
			listIndex = this.getSelectedIndex();	 //得到你所选择的是哪个菜单并作出响应, 你按下的是电话薄
			if (listIndex == 0)
			{
				DowloandGuage d = new DowloandGuage();	//连网的进度条

				//创建新闻中心详细列表的对象
				if (Language.isEnglish)
				{
					newsList = new NewsList("England Football Game News", display, this);
					newsList.newsTicker.setString("Welcome to News Center of England!");
				}
				else
				{
			        newsList = new NewsList("英国超级联赛新闻", display, this);
					newsList.newsTicker.setString("欢迎来到英超新闻中心!");
				}
				//当进度条好了以后,进入下个界面
				d.showForm(display, newsList);
				
			}

			if (listIndex == 1)
			{
				foreshow = new Foreshow();
				foreshow.showForm(display, this);
			}
			if (listIndex == 2)
			{
				DowloandGuage d = new DowloandGuage();	//连网的进度条
				//创建球队详细列表的对象
				if (Language.isEnglish)
				{
					pointForm = new PointForm("Point Info", display, this);
				}
				else
				{
					pointForm = new PointForm("积分榜详细信息", display, this);
				}
				//当进度条好了以后,进入下个界面
				d.showForm(display, pointForm);

			}
			if (listIndex == 3)
			{
				DowloandGuage d = new DowloandGuage();	//连网的进度条
				//创建球队详细列表的对象
				if (Language.isEnglish)
				{
					shooterForm = new ShooterForm("Shot Info", display, this);
				}
				else
				{
					shooterForm = new ShooterForm("射手榜详细信息", display, this);
				}
				//当进度条好了以后,进入下个界面
				d.showForm(display, shooterForm);
				
			}
			if (listIndex == 4)
			{
				if (Language.isEnglish)
				{
					team = new TeamMenuList("Team Menu");
					team.set(0, "Team List", team.icon[0]);
					team.set(1, "Search Team", team.icon[1]);
				}
				else
				{
					team = new TeamMenuList("球队菜单信息");
					team.set(0, "球队列表", team.icon[0]);
					team.set(1, "搜索球队", team.icon[1]);
				}
				team.showForm(display, this);
			}
		}
	}

}

⌨️ 快捷键说明

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