Package net.rim.device.api.util

Examples of net.rim.device.api.util.StringProvider


        private class ListScreenMenuItem extends MenuItem {
            /**
             * 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)
                     */
 
View Full Code Here


        private class RichListScreenMenuItem extends MenuItem {
            /**
             * 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)
                     */
 
View Full Code Here

        private class TreeScreenMenuItem extends MenuItem {
            /**
             * 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)
                     */
 
View Full Code Here

        private class TableAdapterScreenMenuItem extends MenuItem {
            /**
             * Create a TableAdapterScreenMenuItem object
             */
            public TableAdapterScreenMenuItem() {
                super(new StringProvider("Table Adapter Screen"), 0x230050, 4);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
 
View Full Code Here

                        new String[] { CommandFrameworkDemo.EMAIL_ADDR },
                        context);

        if (cmd != null) {
            items.addElement(new CommandItem(
                    new StringProvider("View Contact"), null, cmd));
        } else {
            // Try the add contact command instead
            cmd =
                    queryCommand(new String[] { "app.contacts", "action.add" },
                            new String[] { CommandFrameworkDemo.EMAIL_ADDR },
                            context);
            if (cmd != null) {
                items.addElement(new CommandItem(new StringProvider(
                        "Add Contact"), null, cmd));
            }
        }

        return items;
View Full Code Here

         *            Label text for the menu item
         * @param raw
         *            Raw image data
         */
        SaveMenuItem(final String text, final byte[] raw) {
            super(new StringProvider(text), 0x230010, 0);

            _raw = raw;
            setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
View Full Code Here

        final LocalCommandRegistrarConnection connection =
                new LocalCommandRegistrarConnection();

        // Add a MenuItem for the PopupDialogCommand to the menu
        final MenuItem menuItem =
                new MenuItem(new StringProvider("Popup Dialog"), 0x230010, 0);
        menuItem.setCommand(connection.getCommand(new CommandRequest(
                "PopupDialogCommand")));
        menu.add(menuItem);

        super.makeMenu(menu, context);
View Full Code Here

         * Menu item for invoking the camera application. This provides a
         * convenient method of adding a file to the device file system in order
         * to demonstrate the FileSystemJournalListener.
         */
        final MenuItem cameraItem =
                new MenuItem(new StringProvider("Camera"), 0x230010, 0);
        cameraItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA,
                        new CameraArguments());
            }
        }));

        // Menu item for deleting the selected file
        final MenuItem deleteItem =
                new MenuItem(new StringProvider("Delete"), 0x230020, 1);
        deleteItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                deleteAction();
            }
        }));

        // Menu item for displaying information on the selected file
        final MenuItem selectItem =
                new MenuItem(new StringProvider("Select"), 0x230030, 2);
        selectItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                selectAction();
            }
        }));

        // Menu item for going back one directory in the directory hierarchy
        final MenuItem backItem =
                new MenuItem(new StringProvider("Go Back"), 0x230040, 3);
        backItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
 
View Full Code Here

    private class AddContactAction extends MenuItem {
        /**
         * Creates a new AddContactAction object
         */
        private AddContactAction() {
            super(new StringProvider("Add"), 0x230000, 10);
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * Adds a contact to the contact list
                 *
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
View Full Code Here

         *
         * @param index
         *            The index of the contact from the contact list to view
         */
        private ViewContactAction(final int index) {
            super(new StringProvider("View"), 0x230020, 5);
            _index = index;
            this.setCommand(new Command(new CommandHandler() {

                /**
                 * Displays the contact information.
View Full Code Here

TOP

Related Classes of net.rim.device.api.util.StringProvider

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.