Package net.rim.device.api.command

Examples of net.rim.device.api.command.Command


                    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)
                                     */
 
View Full Code Here


            add(_status);

            // Sends an SMS message
            final MenuItem sendMenuItem =
                    new MenuItem(new StringProvider("Send"), 0x230010, 0);
            sendMenuItem.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
                public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

        /**
         * Creates a new instance of HelpMenuItem
         */
        public HelpMenuItem() {
            super(new StringProvider("Help"), 0x230010, 0);
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
                public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

                        "Select 'Go' from the menu to perform the test.");
        screen.add(_statusField);

        // Add the menu item
        final MenuItem go = new MenuItem(new StringProvider("Go"), 0x230010, 0);
        go.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

            /**
             * Creates a new TableScreenMenuItem object
             */
            public TableScreenMenuItem() {
                super(new StringProvider("Table Screen"), 0x230010, 0);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
                    public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

            /**
             * Creates a new ListScreenMenuItem object
             */
            public ListScreenMenuItem() {
                super(new StringProvider("List Screen"), 0x230020, 1);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
                    public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

            /**
             * Creates a new RichListScreenMenuItem object
             */
            public RichListScreenMenuItem() {
                super(new StringProvider("Rich List Screen"), 0x230030, 2);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
                    public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

            /**
             * Creates a TreeScreenMenuItem object
             */
            public TreeScreenMenuItem() {
                super(new StringProvider("Tree Screen"), 0x230040, 3);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
                    public void execute(final ReadOnlyCommandMetadata metadata,
View Full Code Here

        final Vector items = new Vector();

        final Object context = getContext(field);

        // Try to find a command for this field associated with a contact
        Command cmd =
                queryCommand(new String[] { "app.contacts", "action.view" },
                        new String[] { CommandFrameworkDemo.EMAIL_ADDR },
                        context);

        if (cmd != null) {
View Full Code Here

            request.setContextCategories(categoryCollection);
        }

        final LocalCommandRegistrarConnection connection =
                new LocalCommandRegistrarConnection();
        final Command command = connection.getCommand(request);

        if (command != null && command.canExecute(context)) {
            return command;
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.command.Command

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.