|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--menu.Page | +--menu.MenuPage
A MenuPage is used to hold lists of other Pages. The user selects a Page from the list and then the new Page is shown on the display.
MenuPage can be used as the base class for dynamic Page classes. It uses synchronized blocks to control access to the run variable and other variables that are shared between threads, and it sets the run variable to false if the user requests that we go to another page.
$Id: MenuPage.java,v 1.3 2003/01/21 00:22:07 finson Exp $
Nested Class Summary | |
protected class |
MenuPage.MenuPageScreen
A MenuPageScreen is the Displayable (the view) for a MenuPage (the model). |
Field Summary | |
protected MenuPage.MenuPageScreen |
template
the template that is filled out to be our Displayable |
Fields inherited from class menu.Page |
run, theThread |
Constructor Summary | |
MenuPage(java.lang.String label)
Initialize a new MenuPage object using the supplied parameters and default values where needed. |
|
MenuPage(java.lang.String label,
boolean hasExit)
Initialize a new MenuPage object using the supplied parameters and default values where needed. |
|
MenuPage(java.lang.String label,
java.lang.String title,
javax.microedition.lcdui.Image icon,
boolean hasExit)
Initialize a new MenuPage object using the supplied parameters. |
Method Summary | |
void |
addChild(Page p)
Add a Page to the list of Pages that are children of this menu. |
int |
doCommandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
Process the user command and return an integer value telling the PageMgr what to do next. |
javax.microedition.lcdui.Displayable |
getDisplayable()
Return the Displayable object for this MenuPage, partially filled in and ready to display. |
Page |
getLinkedPage()
Return the Page that this Page feels should be the next page to be displayed. |
void |
removeAllChildren()
Remove all children from the list for this MenuPage. |
Methods inherited from class menu.Page |
getIcon, getLabel, getPrevious, getTitle, setPrevious, start |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected MenuPage.MenuPageScreen template
Constructor Detail |
public MenuPage(java.lang.String label, java.lang.String title, javax.microedition.lcdui.Image icon, boolean hasExit)
label
- short label for this page (as might be used in
a menu)title
- longer label for this page (as might be used in
a screen title)icon
- small icon for this page (as might be used in
a toolbar or menuhasExit
- true if this menu page should have an Exit command.public MenuPage(java.lang.String label, boolean hasExit)
label
- short label for this page (as might be used in
a menu)hasExit
- true if this menu page should have an Exit command.public MenuPage(java.lang.String label)
label
- short label for this page (as might be used in
a menu)Method Detail |
public void addChild(Page p)
p
- the Page to add to the list of child Pagespublic void removeAllChildren()
public int doCommandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
doCommandAction
in class Page
c
- a Command object identifying the command.d
- the Displayable on which this event has occurred
public Page getLinkedPage()
getLinkedPage
in class Page
public javax.microedition.lcdui.Displayable getDisplayable()
getDisplayable
in class Page
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |