?? submidlet.java
字號:
/*
* Author: Huang ye(www.hyweb.net)
* 代碼開源, 引用請注明出處
*
* 創建日期 2005-2-24
*
* TODO 要更改此生成的文件的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板
*/
package net.hyweb;
import java.io.IOException;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
import java.util.*;
/** * @author user
*
* TODO 要更改此生成的類型注釋的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板 */
public class SubMIDlet extends MIDlet {
/**
*
* @uml.property name="subCanvas"
* @uml.associationEnd multiplicity="(0 1)"
*/
private Controller controller;
/**
*
*/
public SubMIDlet() {
controller = new Controller(this);
}
protected void startApp() throws MIDletStateChangeException {
}
protected void pauseApp() {
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
}
/**創建圖形
* @param url
* @return
*/
public static Image createImage(String url){
Image image = null;
try {
image = Image.createImage(url);
} catch (IOException e) {
e.printStackTrace();
}
return image;
}
public static int createRandom(int scale){
Random rand = new Random();
int returnValue = (rand.nextInt() << 1 >>> 1) % scale;
rand = null;
return returnValue;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -