|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmobilecore.ui.core.ScreenManager
public class ScreenManager
This class provides access to the MIDlet's environment and supports navigation among the screens.
Field Summary | |
---|---|
protected static javax.microedition.midlet.MIDlet |
application
Current midlet |
protected static javax.microedition.lcdui.Display |
display
Reference to Display object that is unique to this MIDlet |
protected static java.util.Stack |
screens
A stack of the path to the currently-displayed screen. |
Constructor Summary | |
---|---|
ScreenManager()
|
Method Summary | |
---|---|
static void |
beep(javax.microedition.lcdui.AlertType alert)
Causes the handset to emit a beep if setMIDlet has
been previously called. |
static void |
destructor()
Default destructor. |
static javax.microedition.lcdui.Displayable |
getCurrentScreen()
Gets the current screen (the screen at the top of the stack). |
static javax.microedition.lcdui.Display |
getDisplay()
Gets the Display object associated with the midlet. |
static javax.microedition.midlet.MIDlet |
getMIDlet()
Returns the current MIDlet. |
static void |
goBack()
Makes the previously displayed screen the currently displayed screen. |
static void |
goForward(javax.microedition.lcdui.Displayable newScreen)
Display a new screen, and the new screen supports going back to the previous screen. |
static void |
goHome()
Goes back to the first (home) screen. |
static void |
replaceScreen(javax.microedition.lcdui.Displayable newScreen)
Replaces the currently displayed screen to the new displayed screen. |
static void |
resetScreens()
Resets screen stack |
static void |
setMIDlet(javax.microedition.midlet.MIDlet midlet)
Sets the current MIDlet. |
static void |
showAlert(java.lang.String title,
java.lang.String text,
int delay,
javax.microedition.lcdui.AlertType type)
Shows alert message and backs to current scrren |
static void |
showAlert(java.lang.String title,
java.lang.String text,
int delay,
javax.microedition.lcdui.AlertType type,
javax.microedition.lcdui.Displayable next)
Shows alert message and moves to specified scrren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static javax.microedition.midlet.MIDlet application
setMIDlet(javax.microedition.midlet.MIDlet)
protected static javax.microedition.lcdui.Display display
setMIDlet(javax.microedition.midlet.MIDlet)
protected static java.util.Stack screens
Constructor Detail |
---|
public ScreenManager()
Method Detail |
---|
public static void beep(javax.microedition.lcdui.AlertType alert)
setMIDlet
has
been previously called.
public static void destructor()
public static javax.microedition.lcdui.Displayable getCurrentScreen()
Displayable
objectpublic static javax.microedition.lcdui.Display getDisplay()
Component
, to use
environment information which is accessible only via a MIDlet object. For
example, the following code in
beep
causes the handset to emit a beep.
if ( ScreenManager.getDisplay() != null )
AlertType.WARNING.playSound( ScreenManager.getDisplay() );
setMIDlet
public static javax.microedition.midlet.MIDlet getMIDlet()
setMIDlet(javax.microedition.midlet.MIDlet)
was previously
called, else null
.public static void goBack()
public static void goForward(javax.microedition.lcdui.Displayable newScreen)
newScreen
- The new screen to displaypublic static void goHome()
public static void replaceScreen(javax.microedition.lcdui.Displayable newScreen)
newScreen
- The new replacement screen to displaypublic static void resetScreens()
public static void setMIDlet(javax.microedition.midlet.MIDlet midlet)
javax.microedition.lcdui.Display
,
will be accessible to other objects via this class.
midlet
- The midletpublic static void showAlert(java.lang.String title, java.lang.String text, int delay, javax.microedition.lcdui.AlertType type)
title
- The title for alert screentext
- The alert messagedelay
- How long the alert will be displayed, If delay is Alert.FOREVER
then
alert will be visible until user dismisses ittype
- The alert typeAlert
public static void showAlert(java.lang.String title, java.lang.String text, int delay, javax.microedition.lcdui.AlertType type, javax.microedition.lcdui.Displayable next)
title
- The title for alert screentext
- The alert messagedelay
- How long the alert will be displayed, If delay is Alert.FOREVER
then
alert will be visible until user dismisses ittype
- The alert typenext
- The next screenAlert
|
jMobileCore toolkit | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |