Methods Summary |
---|
public static void | cleanup()Destroys the test MIDlet and waits for the AMS to finish
its processing.
midlet.notifyDestroyed();
try {
midlet.destroyApp(true);
} catch (MIDletStateChangeException ignore) { }
// Wait for the AMS to finish processing.
// IMPL NOTE: there should be a better way than to sleep.
try {
Thread.sleep(1000);
} catch (InterruptedException ignore) { }
|
public void | destroyApp(boolean unconditional)Should be called only by the MIDlet runtime.
midlet = null;
display = null;
|
public static javax.microedition.lcdui.Display | getDisplay()Gets the Display object for the test MIDlet. This is non-null only
between calls to invoke() and cleanup().
return display;
|
public static javax.microedition.midlet.MIDlet | getMIDlet()Gets the MIDlet instance. This is non-null only between calls
to invoke() and cleanup().
return midlet;
|
public static boolean | invoke()Starts the test MIDlet and waits for it to be created, activated, and
for its Display to be put into the foreground and painted. Returns true
if this all worked; returns false if the operation timed out. Passes on
any exceptions that occurred in starting up the MIDlet.
midlet = null;
display = null;
cv = new LcduiTestCanvas();
MIDletStateHandler.getMidletStateHandler().startMIDlet(
"com.sun.midp.util.LcduiTestMIDlet",
"LCDUI Test MIDlet");
return cv.awaitPaint();
|
public void | pauseApp()Should be called only by the MIDlet runtime.
|
public void | startApp()Should be called only by the MIDlet runtime.
display.setCurrent(cv);
|