|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbluegammon.gui.menu.PageItem
bluegammon.gui.menu.BinaryPageItem
An abstract item that can be set to true or false. An image is
used to represent each state.
The method getBoolean
must be implemented
to get the state of the item. The method setBoolean
is
called with the new state when user selects this item.
Field Summary |
Fields inherited from class bluegammon.gui.menu.PageItem |
LAYOUT_ALIGN_LEFT, LAYOUT_ALIGN_RIGHT, LAYOUT_CENTERED_LEFT, LAYOUT_CENTERED_RIGHT |
Constructor Summary | |
BinaryPageItem(char[] label,
javax.microedition.lcdui.Image imageTrue,
javax.microedition.lcdui.Image imageFalse,
MenuPage subPage)
Constructor for BinaryPageItem . |
|
BinaryPageItem(char[] label,
javax.microedition.lcdui.Image imageTrue,
javax.microedition.lcdui.Image imageFalse,
MenuPage subPage,
ItemAction dispatchAction,
int id)
Constructor for BinaryPageItem . |
Method Summary | |
void |
addedToPage()
Initializes this item with correct image. |
abstract boolean |
getBoolean()
Implement this to return the state of the flag. |
void |
itemAction(MenuPage page,
PageItem item)
Toggles the boolean value by calling getBoolean and setBoolean .
|
abstract void |
setBoolean(boolean value)
Implement this to set the state of the flag. |
Methods inherited from class bluegammon.gui.menu.PageItem |
getAction, getId, getImage, getLabel, getLayout, getProperty, getSubPage, isEnabled, setAction, setEnabled, setImage, setLabel, setLayout, setProperty, setSubPage |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BinaryPageItem(char[] label, javax.microedition.lcdui.Image imageTrue, javax.microedition.lcdui.Image imageFalse, MenuPage subPage)
BinaryPageItem
.
label
- The label of the item or null.imageTrue
- Image for true value or null.imageFalse
- Image for false value or null.subPage
- The page that will be navigated to when activating this item,
or null of no such page.public BinaryPageItem(char[] label, javax.microedition.lcdui.Image imageTrue, javax.microedition.lcdui.Image imageFalse, MenuPage subPage, ItemAction dispatchAction, int id)
BinaryPageItem
.
label
- The label of the item or null.imageTrue
- Image for true value or null.imageFalse
- Image for false value or null.subPage
- The page that will be navigated to when activating this item,
or null of no such page.dispatchAction
- The action that is called when activating this item,
or null if no action.id
- The id of this item.Method Detail |
public void addedToPage()
addedToPage
in class PageItem
public void itemAction(MenuPage page, PageItem item)
getBoolean
and setBoolean
.
If a dispatch action is given in constructor, this is
called after switching flags.
itemAction
in interface ItemAction
page
- The page this action is called from.item
- The item this action is called from.public abstract boolean getBoolean()
public abstract void setBoolean(boolean value)
value
- The new boolean value of the flag.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |