|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.midlet.MIDlet
mome.MoMIDlet
public abstract class MoMIDlet
Class MoMIDlet is base abstract class that extends MIDlet
.
Applications that want to use only base functionality common for almost all
MIDlets should extend this class. It implements CommandListener
,
ItemCommandListener
, ItemStateListener
, so it can be set as
command listener on LCDUI components for commands processing. It introduces a
property Display(accessed through getDisplay()
) that holds a
reference of Display instance associated with current MoMIDlet. It introduces
a new callback method initApp()
, that is called only the first time
a MoMIDlet is started. Operations that must be done only the first time
MIDlet enters the active state should be putted here. Display property is
already set when this method executes. MIDletStateChangeException
thrown from this method indicates transient failure; runtime exception - non
transient failure. Any exception thrown will prevent setting initialized flag
to true. This class also introduces method exit()
, that just exits
application.
Constructor Summary | |
---|---|
MoMIDlet()
|
Method Summary | |
---|---|
void |
exit()
Exits application. |
Display |
getDisplay()
Returns Display instance associated with the MIDlet. |
protected void |
initApp()
Initialization method called from startApp() . |
protected boolean |
isInitialized()
Returns initialized flag. |
protected void |
startApp()
Signals the MIDlet that it has entered the Active state. |
Methods inherited from class javax.microedition.midlet.MIDlet |
---|
checkPermission, destroyApp, getAppProperty, notifyDestroyed, notifyPaused, pauseApp, platformRequest, resumeRequest |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.microedition.lcdui.CommandListener |
---|
commandAction |
Methods inherited from interface javax.microedition.lcdui.ItemCommandListener |
---|
commandAction |
Methods inherited from interface javax.microedition.lcdui.ItemStateListener |
---|
itemStateChanged |
Constructor Detail |
---|
public MoMIDlet()
Method Detail |
---|
protected void initApp() throws MIDletStateChangeException
startApp()
. Work that must be
done only the first time MIDlet enters the active state should be putted
here. As method is called from startApp()
:
MIDletStateChangeException
thrown indicates transient failure;
runtime exception - non transient failure. Any exception will prevent
setting initialized flag to true. This method is called after
Display
instance was saved.
MIDletStateChangeException
- is thrown if the MIDlet cannot start now but might be able to
start at a later time.protected void startApp() throws MIDletStateChangeException
Note To maintain the proper invocation of
initApp()
method subclasses overriding this method must call super
method before other operations.
protected void startApp() throws MIDletStateChangeException { super.startApp(); ... }
startApp
in class MIDlet
MIDletStateChangeException
MIDlet.startApp()
protected boolean isInitialized()
public Display getDisplay()
Display
instance associated with the MIDlet.
public void exit()
MIDlet.destroyApp( boolean)
method with
true parameter and notifies Application Management Software about exit (was
any exception thrown or not).
Note Intended to be called from command processors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |