Package bm.core.mvc

Examples of bm.core.mvc.ControllerEvent


            menu.removeCommand( cancelSearch );
            menu.addCommand( search );
        }
        else
        {
            final ControllerEvent event = AbstractController.buildEvent(
                this,
                command,
                menu
            );
            controller.handle( event );
View Full Code Here


            menu.removeCommand( cancelSearch );
            menu.addCommand( search );
        }
        else
        {
            final ControllerEvent event = AbstractController.buildEvent(
                this,
                command,
                menu
            );
            controller.handle( event );
View Full Code Here

            case Canvas.FIRE:
                if( selectedPane == LIST_PANE )
                {
                    if( rowSet != null && rowSet.size() >0 )
                    {
                        controller.handle( new ControllerEvent(
                                ControllerEvent.LIST_ITEM,
                                parent,
                                selectedIndex
                        ) );
                    }
                }
                else
                {
                    final ToolButton button = (ToolButton) buttons.elementAt(
                            selectedButton
                    );
                    controller.handle( new ControllerEvent(
                            button.action,
                            parent
                    ) );
                }
                break;
View Full Code Here

    public void itemSelected( MenuItem item )
    {
        if( item.view == null )
        {
            controller.handle( new ControllerEvent( item.action, this ) );
        }
        else
        {
            final ControllerEvent event = new ControllerEvent( 11000, this );
            event.add( "view", item.view );
            controller.handle( event );
        }
    }
View Full Code Here

                               final Displayable displayable
    )
    {
        if( !handleAction( command ) )
        {
            final ControllerEvent event = AbstractController.buildEvent(
                    this,
                    command,
                    (Choice) displayable
            );
            if( event.getCode() == ControllerEvent.LIST_ITEM )
            {
                final Integer code = (Integer)
                        map.get( new Integer( event.getIndex() ) );
                if( code != null )
                {
                    event.setCode( code.intValue() );
                }
            }
            controller.handle( event );
        }
    }
View Full Code Here

    {
        if( !handleAction( command ) )
        {
            if( command == selectCommand )
            {
                controller.handle( new ControllerEvent( selectCommandId, this ) );
            }
            else if( !handleCommand( command ) )
            {
                AbstractController.commandAction( this, command );
            }
View Full Code Here

        if( !handleAction( command ) )
        {
            if( command == previousCommand )
            {
                lastButton = 0;
                final ControllerEvent event = new ControllerEvent( this );
                event.setCode( MOVE_PREVIOUS );
                getController().handle( event );
            }
            else if( command == nextCommand )
            {
                lastButton = 1;
                final ControllerEvent event = new ControllerEvent( this );
                event.setCode( MOVE_NEXT );
                getController().handle( event );
            }
            else if( command == selectCommand )
            {
                controller.handle( new ControllerEvent( selectCommandId, this ) );
            }
        }
    }
View Full Code Here

        if( !handleAction( command ) )
        {
            if( !handleCommand( command ) )
            {
                final List list = (List) displayable;
                final ControllerEvent event = AbstractController.buildEvent(
                        this,
                        command,
                        list
                );
                if( event.getCode() == ControllerEvent.LIST_ITEM )
                {
                    final int listSelectedIndex = list.getSelectedIndex();
                    if( listSelectedIndex < speedOptionsAction.size() )
                    {
                        event.setCode(
                                ((Integer) speedOptionsAction.elementAt(
                                        listSelectedIndex
                                )).intValue()
                        );
                    }
                    else
                    {
                        if( page == 0 )
                        {
                            if( listSelectedIndex < pageSize )
                            {
                                event.setIndex( listSelectedIndex );
                            }
                            else
                            {
                                event.setCode( PAGE_DOWN );
                            }
                        }
                        else
                        {
                            if( listSelectedIndex == speedOptionsAction.size() )
                            {
                                event.setCode( PAGE_UP );
                            }
                            else if( listSelectedIndex < (pageSize + speedOptionsAction.size() + 1) )
                            {
                                event.setIndex( listSelectedIndex );
                            }
                            else
                            {
                                event.setCode( PAGE_DOWN );
                            }
                        }
                    }
                }
                controller.handle( event );
View Full Code Here

TOP

Related Classes of bm.core.mvc.ControllerEvent

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.