Package net.rim.device.api.util

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


             *            The index of the participant to delete
             * @param field
             *            The field in which the participant is displayed
             */
            public DeleteParticipant(final int index, final Field field) {
                super(new StringProvider("Delete Participant"), 0x230030, 100);

                _index = index;
                _field = field;
                this.setCommand(new Command(new CommandHandler() {
                    /**
 
View Full Code Here


     */
    private final class Edit extends MenuItem {
        private final int _index;

        private Edit(final int index) {
            super(new StringProvider("Edit"), 0x230030, 2);
            _index = index;
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
View Full Code Here

     */
    private final class Delete extends MenuItem {
        private final int _index;

        private Delete(final int index) {
            super(new StringProvider("Delete"), 0x230040, 3);
            _index = index;
            this.setCommand(new Command(new CommandHandler() {
                /**
                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
View Full Code Here

        _status = new EditField();
        add(_status);

        // Menu item to attach a picture to the MMS
        final MenuItem attachPicture =
                new MenuItem(new StringProvider("Attach Picture"), 0x230010, 0);
        attachPicture.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                _app.attach(MMSDemo.PICTURE);
            }
        }));

        // Menu item to attach an audio file to the MMS
        final MenuItem attachAudio =
                new MenuItem(new StringProvider("Attach Audio"), 0x230020, 1);
        attachAudio.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                _app.attach(MMSDemo.AUDIO);
            }
        }));

        // Menu item to send the MMS
        final MenuItem sendMenuItem =
                new MenuItem(new StringProvider("Send"), 0x230030, 3);
        sendMenuItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                // Send MMS on non-event thread
                final Thread t = new Thread() {
                    public void run() {
                        _app.sendMMS(_addressField, _subjectField,
                                _messageField);
                    }
                };
                t.start();
            }
        }));

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

        // Add the TableView to the screen
        add(_view);

        readRoots(ROOT);

        _selectItem = new MenuItem(new StringProvider("Select"), 0x230010, 0);
        _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();
            }
        }));

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

                    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,
View Full Code Here

            _status = new EditField(Field.NON_FOCUSABLE);
            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)
                 */
 
View Full Code Here

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

        initFields();
        _isVerizonField.setChangeListener(this);

        // A MenuItem to start the diagnostic test
        final MenuItem startTestItem =
                new MenuItem(new StringProvider("Start Test"), 0x300010, 0);
        startTestItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                // Format the UI for output
                showOutputFields();

                if (_locThread != null) {
                    if (!_locThread.isStopped()) {
                        _locThread.stop();
                    }
                }

                _log.setText("");
                log("Core GPS API test starting");
                log("Device: " + DeviceInfo.getDeviceName());
                log("Device Software: " + DeviceInfo.getSoftwareVersion());
                log("Carrier: " + RadioInfo.getCurrentNetworkName());

                // Begin test
                _locThread = new LocationThread();
                _locThread.start();
            }
        }));
        addMenuItem(startTestItem);

        _stopTestItem =
                new MenuItem(new StringProvider("Stop Test"), 0x300020, 1);
        _stopTestItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                // Stop the thread
                log("Stopping test");
                _locThread.stop();
                _locThread = null;
            }
        }));
        addMenuItem(_stopTestItem);

        // A MenuItem to display the help dialog
        final MenuItem helpItem =
                new MenuItem(new StringProvider("Help"), 0x300030, 2);
        helpItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
 
View Full Code Here

        private class TableScreenMenuItem extends MenuItem {
            /**
             * 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)
                     */
 
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.