|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
bluegammon.gui.PopupCanvas
bluegammon.gui.MenuCanvas
The MenuCanvas
is the handler of the Bluegammon
menu. There is only one menu per game, thus the singleton pattern.
Menu
Field Summary |
Fields inherited from class javax.microedition.lcdui.Canvas |
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
Method Summary | |
void |
actionCalled(MenuPage page,
PageItem item,
ItemAction action)
Called when an ItemAction is invoked. |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
|
static MenuCanvas |
getInstance()
Returns the singleton instance. |
void |
initShow()
Initializes the states of items and starts the muzak, called on an already initialized menu when it is focused again. |
void |
itemAction(MenuPage page,
PageItem item)
ItemAction implementation, called from items in this menu. |
void |
itemSelected(MenuPage page,
PageItem oldItem,
PageItem newItem)
Called when a item is selected in a page. |
void |
newPage(MenuPage fromPage,
MenuPage toPage,
boolean back)
Called when a new page is shown. |
void |
transitionStarted(MenuPage fromPage,
MenuPage toPage,
long delay,
int frames,
boolean back)
Called when a transition is started on a new page selection. |
void |
transitionStopped(MenuPage fromPage,
MenuPage toPage)
Called when a transition is finished. |
Methods inherited from class bluegammon.gui.PopupCanvas |
getPopup, setPopup |
Methods inherited from class javax.microedition.lcdui.Canvas |
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setFullScreenMode |
Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static MenuCanvas getInstance()
public void initShow()
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
commandAction
in interface javax.microedition.lcdui.CommandListener
public void itemAction(MenuPage page, PageItem item)
itemAction
in interface ItemAction
page
- The page from which the action was calleditem
- The item to which the action belongspublic void newPage(MenuPage fromPage, MenuPage toPage, boolean back)
MenuListener
newPage
in interface MenuListener
fromPage
- Old page or null.toPage
- New page.back
- true if user steps back, false if active choice forwards.public void itemSelected(MenuPage page, PageItem oldItem, PageItem newItem)
MenuListener
itemSelected
in interface MenuListener
page
- The page in which the item is selected.oldItem
- The item that is deselected or null if no such item.newItem
- The item that is selected.public void actionCalled(MenuPage page, PageItem item, ItemAction action)
MenuListener
actionCalled
in interface MenuListener
page
- The page in which the action was invoked.item
- The item the action belongs to.action
- The action.public void transitionStarted(MenuPage fromPage, MenuPage toPage, long delay, int frames, boolean back)
MenuListener
transitionStarted
in interface MenuListener
fromPage
- Old page or null.toPage
- New page.delay
- Delay between each transition frame in milliseconds.frames
- Number of frames in this transition.back
- True if this is transition back to a previous page.public void transitionStopped(MenuPage fromPage, MenuPage toPage)
MenuListener
transitionStopped
in interface MenuListener
fromPage
- Old page or null.toPage
- New page.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |