samplemidlet.java

来自「j2me游戏开发实例:手机动画编辑器的应用」· Java 代码 · 共 46 行

JAVA
46
字号
package com.j2medev.chapter5;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class SampleMIDlet extends MIDlet {
    protected Display m_Display;
    protected SampleCanvas m_Canvas;
    
    public SampleMIDlet() {
        this.m_Display = Display.getDisplay(this);
        this.m_Canvas = new SampleCanvas(this.m_Display);
        this.m_Canvas.m_MIDlet = this;
    }
    
    /**
     * destroyApp
     *
     * @param _boolean boolean
     * @throws MIDletStateChangeException
     * @todo Implement this javax.microedition.midlet.MIDlet method
     */
    protected void destroyApp(boolean _boolean) throws
            MIDletStateChangeException {
        notifyDestroyed();
    }
    
    /**
     * pauseApp
     *
     * @todo Implement this javax.microedition.midlet.MIDlet method
     */
    protected void pauseApp() {
        this.m_Display.setCurrent(null);
    }
    
    /**
     * startApp
     *
     * @throws MIDletStateChangeException
     * @todo Implement this javax.microedition.midlet.MIDlet method
     */
    protected void startApp() throws MIDletStateChangeException {
        this.m_Display.setCurrent(this.m_Canvas);
    }
}

⌨️ 快捷键说明

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