Package net.rim.device.api.command

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


        /**
         * Creates a new AddItem object
         */
        private AddItem() {
            super(new StringProvider("Add Memo"), 0x230010, 100);
            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


         *            The memo to copy
         */
        private CopyItem(final BlackBerryMemo memo) {
            super(new StringProvider("Add Copy of Memo"), 0x230020, 200);
            _memo = memo;
            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

             *            The record to view
             */
            private View(final PhoneNumberRecord record) {
                super(new StringProvider("View"), 0x230020, 100);
                _record = record;
                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

         *            The memo to view
         */
        private ViewItem(final BlackBerryMemo memo) {
            super(new StringProvider("View Memo"), 0x230030, 50);
            _memo = memo;
            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

         *            The memo to edit
         */
        private EditItem(final BlackBerryMemo memo) {
            super(new StringProvider("Edit Memo"), 0x230040, 400);
            _memo = memo;
            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

         * @param memo
         *            The memo to delete
         */
        private DeleteItem(final BlackBerryMemo memo) {
            super(new StringProvider("Delete Memo"), 0x230050, 500);
            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

             * @param record
             *            The phone record to delete
             */
            private Delete(final PhoneNumberRecord record) {
                super(new StringProvider("Delete"), 0x230030, 110);
                this.setCommand(new Command(new CommandHandler() {
                    /**
                     * Deletes the phone record
                     *
                     * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                     *      Object)
View Full Code Here

        add(_contentField);

        // Menu item to save the displayed memo
        final MenuItem saveItem =
                new MenuItem(new StringProvider("Save"), 0x230020, 0);
        saveItem.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 EventScreen object
     */
    public EventScreen() {
        final MenuItem saveMenuItem =
                new MenuItem(new StringProvider("Save Event"), 0x230020, 1);
        saveMenuItem.setCommand(new Command(new CommandHandler() {
            /**
             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                // If successful display message and close screen.
                if (onSave()) {
                    Dialog.alert("Event was saved successfully");
                    UiApplication.getUiApplication().pushScreen(
                            new EventScreen());
                    onClose();
                }
            }
        }));
        ;

        _invitees = new Vector();
        // MenuItem for adding an invite field to the create screen
        final MenuItem inviteContactMenuItem =
                new MenuItem(new StringProvider("Invite Contact"), 0x230010, 0);
        inviteContactMenuItem.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 ContactScreen object
     */
    public ContactScreen() {
        final MenuItem saveMenuItem =
                new MenuItem(new StringProvider("Save Contact"), 0x230010, 5);
        saveMenuItem.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

TOP

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

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.