Package net.rim.device.api.util

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


         * @param function
         *            The ScriptableFunction to be executed by this MenuItem
         */
        public ScriptableMenuItem(final String label,
                final ScriptableFunction function) {
            super(new StringProvider(label), 0x230010, 0);
            _function = function;
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
View Full Code Here


            addKeyListener(new PhoneLogsDemoKeyListener(this));

            // Create menu item for adding a new phone call log
            _addPhoneCallLog =
                    new MenuItem(new StringProvider("Add Phone Call"),
                            0x230010, 0);
            _addPhoneCallLog.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
                public void execute(final ReadOnlyCommandMetadata metadata,
                        final Object context) {
                    PhoneLogsDemo.this.pushScreen(new AddPhoneCallLogScreen());
                }
            }));

            // Create menu item for adding a new conference phone call log
            _addConferencePhoneCallLog =
                    new MenuItem(new StringProvider("Add Conference Call"),
                            0x230020, 1);
            _addConferencePhoneCallLog.setCommand(new Command(
                    new CommandHandler() {
                        /**
                         * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                         *      Object)
                         */
                        public void execute(
                                final ReadOnlyCommandMetadata metadata,
                                final Object context) {
                            PhoneLogsDemo.this
                                    .pushScreen(new AddConferencePhoneCallLogScreen());
                        }
                    }));

            // Create menu item for deleting all call logs in a folder
            _deleteAllItem =
                    new MenuItem(new StringProvider("Delete All"), 0x230030,
                            130);
            _deleteAllItem.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
View Full Code Here

                if (tableRef.getNumberOfRows() > 0) {
                    final CallLog callLog = table.getSelectedItem();

                    // Create menu item to view the currently selected call
                    final MenuItem viewItem =
                            new MenuItem(new StringProvider("View"), 0x230010,
                                    100);
                    viewItem.setCommand(new Command(new CommandHandler() {
                        /**
                         * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                         *      Object)
                         */
                        public void execute(
                                final ReadOnlyCommandMetadata metadata,
                                final Object context) {
                            PhoneLogsDemo.this
                                    .pushScreen(new ViewCallLogScreen(callLog,
                                            tableRef.getSelectedIndex(),
                                            tableRef.getModel()));
                        }
                    }));
                    menu.add(viewItem);

                    // Create menu item to edit the currently selected call
                    final MenuItem editItem =
                            new MenuItem(new StringProvider("Edit"), 0x230020,
                                    110);
                    editItem.setCommand(new Command(new CommandHandler() {
                        /**
                         * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                         *      Object)
                         */
                        public void execute(
                                final ReadOnlyCommandMetadata metadata,
                                final Object context) {
                            PhoneLogsDemo.this
                                    .pushScreen(new EditCallLogScreen(callLog,
                                            tableRef.getSelectedIndex(),
                                            tableRef.getModel()));
                        }
                    }));
                    menu.add(editItem);

                    // Create menu item to delete the currently selected call
                    final MenuItem deleteItem =
                            new MenuItem(new StringProvider("Delete"),
                                    0x230030, 120);
                    deleteItem.setCommand(new Command(new CommandHandler() {
                        /**
                         * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                         *      Object)
View Full Code Here

                    addMenuItem(deviceMenuItem);
                }
            }

            final MenuItem listenItem =
                    new MenuItem(new StringProvider("Listen for connections"),
                            0x230010, 0);
            listenItem.setCommand(new Command(new CommandHandler() {
                /**
                 * Launches a connection waiting screen.
                 *
 
View Full Code Here

         * @param info
         *            The Bluetooth Serial Port information of the paired device
         *            this menu item will invoke a connection to
         */
        DeviceMenuItem(final String text, final BluetoothSerialPortInfo info) {
            super(new StringProvider(text), 0x230020, 20);
            _info = info;
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * Invokes the connection to the device associated with the
                 * Bluetooth Serial Port information stored in this object.
View Full Code Here

        });

        add(_shortcutButton);

        _setHomeScreenImage =
                new MenuItem(new StringProvider("Set as Home Screen Image"),
                        0x230010, 0);
        _setHomeScreenImage.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                setImage();
            }
        }));

        _addHomeScreenShortCut =
                new MenuItem(new StringProvider("Add Shortcut"), 0x230020, 1);
        _addHomeScreenShortCut.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
 
View Full Code Here

                add((Field) fields.elementAt(i));
            }

            // Create a menu item to save the new call
            final MenuItem saveItem =
                    new MenuItem(new StringProvider("Save"), 0x230010, 100);
            saveItem.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
 
View Full Code Here

        for (int i = 0; i < numFields; ++i) {
            add((Field) fields.elementAt(i));
        }

        _editItem = new MenuItem(new StringProvider("Edit"), 0x230010, 0);
        _editItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                /* outer. */makeEditScreen();
            }
        }));

        _saveItem = new MenuItem(new StringProvider("Save"), 0x230010, 0);
        _saveItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
 
View Full Code Here

                add((Field) fields.elementAt(i));
            }

            // Create a menu item to save the new call
            final MenuItem saveItem =
                    new MenuItem(new StringProvider("Save"), 0x230010, 100);
            saveItem.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
 
View Full Code Here

        private final class AddParticipant extends MenuItem {
            /**
             * Create a new AddParticipant object
             */
            public AddParticipant() {
                super(new StringProvider("Add Participant"), 0x230020, 110);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
                     */
 
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.