|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--menu.PageMgr
This class manages a hierarchy of linked Page objects. Each page has a related Displayable, and the commands associated with the Displayable enable the user to jump from Page to Page and perform various actions on those pages.
Some of the public fields are integer pageAction codes that are returned by the doCommandAction methods of the various Pages. The codes drive the cycling of Pages by this class.
Some of the public fields are Command objects. These commands can be used by the various Pages to attach Commands to their Displayables. These are essentially singletons to reduce memory usage.
$Id: PageMgr.java,v 1.4 2003/01/20 23:27:02 finson Exp $
Field Summary | |
static int |
BACK
Display the previously displayed page |
static javax.microedition.lcdui.Command |
BACK_COMMAND
Return to previously displayed page. |
static int |
CANCEL
Display the previously displayed page |
static javax.microedition.lcdui.Command |
CANCEL_COMMAND
User cancels action proposal on displayed page. |
static int |
EXIT
Exit the application entirely |
static javax.microedition.lcdui.Command |
EXIT_COMMAND
Exit the application entirely. |
static javax.microedition.lcdui.Command |
HELP_COMMAND
Display a help message. |
static int |
LINK
Display a linked page. |
static int |
NONE
Continue to display the current page. |
static javax.microedition.lcdui.Command |
OK_COMMAND
User confirms action proposal on displayed page. |
static int |
ROOT
Display the root page of the hierarchy |
static javax.microedition.lcdui.Command |
STOP_COMMAND
User requests termination of on-going action. |
Constructor Summary | |
PageMgr(QuitableMIDlet m)
Construct a new PageMgr. |
Method Summary | |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
Dispatch user commands and then adjust the display as needed. |
void |
showRoot(Page r)
Activate the device display by showing the root Page. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ROOT
public static final int BACK
public static final int CANCEL
public static final int EXIT
public static final int LINK
public static final int NONE
public static final javax.microedition.lcdui.Command BACK_COMMAND
public static final javax.microedition.lcdui.Command CANCEL_COMMAND
public static final javax.microedition.lcdui.Command EXIT_COMMAND
public static final javax.microedition.lcdui.Command HELP_COMMAND
public static final javax.microedition.lcdui.Command OK_COMMAND
public static final javax.microedition.lcdui.Command STOP_COMMAND
Constructor Detail |
public PageMgr(QuitableMIDlet m)
m
- the QuitableMIDlet that we are part of. We need
this object so that we can call quitApp
if the EXIT command is given. We also use it to get
Display information.Method Detail |
public void showRoot(Page r)
r
- the root Page of the hierarchypublic void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- a Command object identifying the command.d
- the Displayable on which this event has occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |