Package net.rim.device.api.unifiedsearch.action

Examples of net.rim.device.api.unifiedsearch.action.UiAction


                final Object element = _displayables.elementAt(i);

                if (element instanceof UnifiedSearchDemoEntity) {
                    final UnifiedSearchDemoEntity item =
                            (UnifiedSearchDemoEntity) element;
                    final UiAction action = item.getUiActions(null, null);

                    if (action != null) {
                        // Add the appropriate UiAction to the context menu
                        final MenuItem performActionItem =
                                new MenuItem(new StringProvider(action
                                        .toString()), 0x230010, 0);
                        performActionItem.setCommand(new Command(
                                new CommandHandler() {
                                    /**
                                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                                     *      Object)
                                     */
                                    public
                                            void
                                            execute(final ReadOnlyCommandMetadata metadata,
                                                    final Object context) {
                                        action.performAction(item);
                                    }
                                }));
                        menu.addItem(performActionItem);
                    }
                }
View Full Code Here

TOP

Related Classes of net.rim.device.api.unifiedsearch.action.UiAction

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.