www.pudn.com > WordTip.zip > WordTipMIDlet.java


/* 
 * Created on 2005-1-26 
 * 
 * TODO To change the template for this generated file go to 
 * Window - Preferences - Java - Code Style - Code Templates 
 */ 
package net.hyweb; 
 
import javax.microedition.midlet.MIDlet; 
import javax.microedition.lcdui.*; 
import javax.microedition.midlet.MIDletStateChangeException; 
 
import net.hyweb.ui.*; 
import net.hyweb.wordmodel.*; 
 
/** 
 * @author user 
 * 
 * TODO To change the template for this generated type comment go to 
 * Window - Preferences - Java - Code Style - Code Templates 
 */ 
public class WordTipMIDlet extends MIDlet { 
	 
	private UIController uicontroller; 
	private Model model; 
	private Display display; 
	static  WordTipMIDlet myMIDlet; 
 
	/** 
	 * @return 返回 myMIDlet。 
	 */ 
	public static WordTipMIDlet getMyMIDlet() { 
		return myMIDlet; 
	} 
	/** 
	 *  
	 */ 
	public WordTipMIDlet() { 
		super(); 
		EventID.Perform_Vendor         =  getAppProperty("MIDlet-Vendor"); 
        EventID.Perform_Description    =  getAppProperty("MIDlet-Description"); 
        EventID.Perform_JadFileVersion =  getAppProperty("JadFile-Version");  
        EventID.Perform_MIDletDataSize =  getAppProperty("MIDlet-Data-Size"); 
	} 
 
	protected void startApp() throws MIDletStateChangeException { 
		 
		uicontroller = new UIController(WordTipMIDlet.this); 
		 
		//每次启动MIDlet都重新打开RMS 
		model        = new Model();	 
		 
		uicontroller.init(model); 
	} 
 
	protected void pauseApp() { 
 
	} 
 
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException { 
 
	} 
 
}