midletproxy.java

来自「有关j2me的很好的例子可以研究一下」· Java 代码 · 共 74 行

JAVA
74
字号
/* * 01/03/05 @(#)MIDletProxy.java	1.3 * * Copyright 1998-2000 by Sun Microsystems, Inc., * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of Sun Microsystems, Inc. ("Confidential Information").  You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * you entered into with Sun. */package javax.microedition.midlet;import com.sun.midp.midlet.MIDletState;/** * a proxy object that extends the state of the MIDlet. This class provides * access to startApp,pauseApp and destroyApp methods. */class MIDletProxy extends MIDletState {    /**     * Protected constructor for subclasses.     * If any MIDlet is constructed it should be registered     * with Scheduler. That will allow them to be managed even if     * the application creates them itself.     * @param m the MIDlet that will be accessed from this proxy object.     */    MIDletProxy(MIDlet m) {	super(m);    }    /**     * Forwards startApp method to the MIDlet from the scheduler.     *     * @exception <code>MIDletStateChangeException</code>  is thrown if the     *		<code>MIDlet</code> cannot start now but might be able     *		to start at a later time.     */    protected void startApp() throws MIDletStateChangeException {	midlet.startApp();    }    /**     * Forwards pauseApp method to the MIDlet from the scheduler.     *     */    protected void pauseApp() {	midlet.pauseApp();    }    /**     * Forwards destoryApp method to the MIDlet from the scheduler.     *     * @param unconditional the flag to pass to destroy     *     * @exception <code>MIDletStateChangeException</code> is thrown     *		if the <code>MIDlet</code>     *		wishes to continue to execute (Not enter the <i>Destroyed</i>     *          state).     *          This exception is ignored if <code>unconditional</code>     *          is equal to <code>true</code>.     */    protected void destroyApp(boolean unconditional)	throws MIDletStateChangeException {	midlet.destroyApp(unconditional);    }}

⌨️ 快捷键说明

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