?? huarongroadmidlet.java
字號(hào):
/*
* 創(chuàng)建日期 2005-6-29
*
* TODO 要更改此生成的文件的模板,請(qǐng)轉(zhuǎn)至
* 窗口 - 首選項(xiàng) - Java - 代碼樣式 - 代碼模板
*/
package game;
import java.io.IOException;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
/**
* @author Administrator
*
* TODO 要更改此生成的類型注釋的模板,請(qǐng)轉(zhuǎn)至
* 窗口 - 首選項(xiàng) - Java - 代碼樣式 - 代碼模板
*/
public class HuaRongRoadMIDlet extends MIDlet {
private GameScreen gameScreen;
/**
*
*/
public HuaRongRoadMIDlet() {
super();
// TODO 自動(dòng)生成構(gòu)造函數(shù)存根
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException {
// 獲取當(dāng)前界面
Displayable current = Display.getDisplay(this).getCurrent();
if (current == null) {
// 裝載logo圖象
Image logo = null;
try
{
logo = Image.createImage("/logo.png");
}
catch (IOException e) { }
// 顯示logo
Alert splashScreen = new Alert(null, "郎銳2005年作\n版權(quán)所有(c)\n2005--2006", logo, AlertType.INFO);
// 顯示當(dāng)前界面
Display.getDisplay(this).setCurrent(current);
// 延遲4秒
splashScreen.setTimeout(4000);
// 新建GameScreen對(duì)象
gameScreen = new GameScreen(this);
// 設(shè)置游戲界面
Display.getDisplay(this).setCurrent(splashScreen, gameScreen);
}
else
{
// 顯示當(dāng)前界面
Display.getDisplay(this).setCurrent(current);
}
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#pauseApp()
*/
protected void pauseApp() {
// TODO 自動(dòng)生成方法存根
}
/* (非 Javadoc)
* @see javax.microedition.midlet.MIDlet#destroyApp(boolean)
*/
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO 自動(dòng)生成方法存根
}
public void quit() throws MIDletStateChangeException
{
// 退出程序
destroyApp(false);
notifyDestroyed();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -