FileDocCategorySizeDatePackage
NativeMenu.javaAPI DocphoneME MR2 API (J2ME)3277Wed May 02 18:00:22 BST 2007javax.microedition.lcdui

NativeMenu

public class NativeMenu extends Object
This utility class is used to show & hide native system menus. Is not needed in Chameleon (needed in platform_widgets). shall be used only by Display.

Fields Summary
private static boolean
inMenu
True if the foreground display is the menu screen.
Constructors Summary
Methods Summary
public static voidclearState()
Clear state of system menu without physical dismiss. Intended to be used by displayEventConsumer.handlecommandEvent() (implemented by Display.DisplayAccessor).

        inMenu = false;
    
public static voiddismiss()
Called to force the display manager to clear whatever system screen has interrupted the current Displayable and allow the foreground Display to resume painting.

        inMenu = false;
        dismissMenuAndPopup();
    
private static native voiddismissMenuAndPopup()
Native method to dismiss the current menu or popup in the case of setCurrent() being called while the Display is suspended by a system screen.

public static booleangetState()
Returns current status of the system menu. Intended to be used by displayEventConsumer.handlecommandEvent() (implemented by Display.DisplayAccessor).

return
true if menu is active, false otherwise.

        return inMenu;
    
public static voidshow()
Called to show system menu on the screen

        showMenu();
        inMenu = true;
    
private static native voidshowMenu()
Native method to show the command menu on the screen

public static native voidupdateCommands(Command[] itemCommands, int numItemCommands, Command[] commands, int numCommands)
Set the current set of active Abstract Commands.

param
itemCommands The list of Item Commands that should be active
param
numItemCommands The number of Item commands in the list
param
commands The list of Commands that should be active
param
numCommands The number of commands in the list