Package blackberry.ui.menu.item

Examples of blackberry.ui.menu.item.MenuItemObject$MenuItemImpl


     * @see blackberry.core.ScriptableFunctionBase#execute(Object, Object[])
     */
    public Object execute( Object thiz, Object[] args ) throws Exception {
        // Get the screen that currently owns the BrowserField
        MainScreen screen = (MainScreen) MenuExtension.getBrowserField().getScreen();
        MenuItemObject menuItem = (MenuItemObject) args[ 0 ];

        boolean addSucceed = MenuItemObjectManager.addMenuItemObject( menuItem );

        if( addSucceed ) {
            screen.addMenuItem( menuItem.getMenuItem() );
        }
        return UNDEFINED;
    }
View Full Code Here


    /**
     * @see blackberry.core.ScriptableFunctionBase#execute(Object, Object[])
     */
    public Object execute( Object thiz, Object[] args ) throws Exception {
        MenuItemObject menuItem = (MenuItemObject) args[ 0 ];
        return new Boolean( MenuItemObjectManager.hasMenuItemObject( menuItem ) );
    }
View Full Code Here

     * @see blackberry.core.ScriptableFunctionBase#execute(Object, Object[])
     */
    public Object execute( Object thiz, Object[] args ) throws Exception {
        // Get the screen that currently owns the BrowserField
        MainScreen screen = (MainScreen) MenuExtension.getBrowserField().getScreen();
        MenuItemObject menuItem = (MenuItemObject) args[ 0 ];

        screen.removeMenuItem( menuItem.getMenuItem() );
        MenuItemObjectManager.removeMenuItemObject( menuItem );
        return UNDEFINED;
    }
View Full Code Here

    /**
     * @see blackberry.core.ScriptableFunctionBase#execute(Object, Object[])
     */
    public Object execute( Object thiz, Object[] args ) throws Exception {
        MenuItemObject menuItem = (MenuItemObject) args[ 0 ];

        if( !( (Boolean) menuItem.getField( MenuItemObject.FIELD_ISSEPARATOR ) ).booleanValue() ) {
            // Get the screen that currently owns the BrowserField
            MainScreen screen = (MainScreen) MenuExtension.getBrowserField().getScreen();
            MenuItem defaultItem = screen.getDefaultMenuItem( Menu.INSTANCE_DEFAULT );
            if( defaultItem == null ) {
                menuItem.setPriority( Integer.MAX_VALUE );
            } else {
                menuItem.setPriority( defaultItem.getPriority() - 1 );
            }
        }
        return UNDEFINED;
    }
View Full Code Here

TOP

Related Classes of blackberry.ui.menu.item.MenuItemObject$MenuItemImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.