Package com.rim.samples.device.communicationapidemo.ui

Examples of com.rim.samples.device.communicationapidemo.ui.FullWidthButton


        });

        _autoStartEnabled =
                new CheckboxField("Auto-start when message arrives", true);

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                ((UiApplication) ReceivePushScreen.this.getApplication())
                        .popScreen(ReceivePushScreen.this);
            }
        });

        final FullWidthButton startButton =
                new FullWidthButton("Start Receiver");
        startButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (_isBlocking.getChecked()) {
                    // Blocking receiver
                    controller.startBlockingReceiverBES(_uriReceiverField
                            .getText(), _autoStartEnabled.getChecked(),
                            CommunicationController.TIMEOUT);
                } else {
                    // Non blocking receiver
                    controller.startNonBlockingReceiverBES(_uriReceiverField
                            .getText(), _autoStartEnabled.getChecked());
                }

            }
        });

        final FullWidthButton pauseButton =
                new FullWidthButton("Pause Receiver");
        pauseButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.pauseReceiver(_uriReceiverField.getText());
            }
        });

        final FullWidthButton resumeButton =
                new FullWidthButton("Resume Receiver");
        resumeButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.resumeReceiver(_uriReceiverField.getText());
            }
        });

        final FullWidthButton releaseButton =
                new FullWidthButton("Release Receiver");
        releaseButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.releaseReceiver(_uriReceiverField.getText());

            }
        });

        final FullWidthButton destroyButton =
                new FullWidthButton("Destroy Receiver");
        destroyButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.destroyReceiver(_uriReceiverField.getText());
View Full Code Here


     * Create a new MenuSendNonBlockScreen object
     */
    public MenuSendNonBlockScreen(final MenuManager menuManager) {
        setTitle("Non-Blocking");

        final FullWidthButton atomBtn = new FullWidthButton("Atom");
        final FullWidthButton jsonBtn = new FullWidthButton("JSON");
        final FullWidthButton rssBtn = new FullWidthButton("RSS");
        final FullWidthButton soapBtn = new FullWidthButton("SOAP");
        final FullWidthButton xmlBtn = new FullWidthButton("XML");

        atomBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockAtomScreen();
            }
        });

        jsonBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockJsonScreen();
            }
        });

        rssBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockRssScreen();
            }
        });

        soapBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockSoapScreen();
            }
        });

        xmlBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockXmlScreen();
View Full Code Here

        _uriSenderField =
                new EditField("URI:", CommunicationController.ECHO_SERVER_URI
                        + "SOAP", 140, 0);

        final FullWidthButton postButton = new FullWidthButton("Get Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

        _callback = new SendNonBlockAtomScreenCallback(this);

        _uriSenderField =
                new EditField("URI:", CommunicationController.ECHO_SERVER_URI
                        + "ATOM", 140, 0);
        final FullWidthButton postButton = new FullWidthButton("Get Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

            }
        });

        _uriSenderField = new EditField("Sender URI:", "", 140, 0);

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                ((UiApplication) SendFireForgetScreen.this.getApplication())
                        .popScreen(SendFireForgetScreen.this);
            }
        });

        final FullWidthButton postButton = new FullWidthButton("Send message");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.sendFireForget(_uriSenderField.getText());
View Full Code Here

        _callback = new SendNonBlockJsonScreenCallback(this);

        _uriSenderField =
                new EditField("URI:", CommunicationController.ECHO_SERVER_URI
                        + "JSON", 140, 0);
        final FullWidthButton postButton = new FullWidthButton("Get Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

        setTitle("Basic Authentication");

        _callback = new AuthentificationScreenCallback(this);

        // Initialize UI components
        final FullWidthButton backButton = new FullWidthButton("Back");
        _uriField =
                new EditField("Enter URL:",
                        "http://twitter.com/statuses/user_timeline.json", 140,
                        0);
        _userIdField = new EditField("Username:", "debobb", 140, 0);
        _passwordField = new EditField("Password:", "debo2010", 140, 0);

        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                ((UiApplication) AuthenticationScreen.this.getApplication())
                        .popScreen(AuthenticationScreen.this);
            }
        });

        final FullWidthButton postButton = new FullWidthButton("Get Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

                                                                              // the
                                                                              // push
                                                                              // port
        _appIdField = new EditField("Application ID:", "", 140, 0);

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                ((UiApplication) ReceiveBPSScreen.this.getApplication())
                        .popScreen(ReceiveBPSScreen.this);
            }
        });

        _contentField =
                new EditField("Content provider URI:",
                        "https://10.11.23.45:8443/sample-app/subscribe", 140, 0);

        final FullWidthButton postButton =
                new FullWidthButton("Subscribe for push");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                controller.registerBPSPush(_appIdField.getText(), _uriField
View Full Code Here

        _uriSenderField =
                new EditField("Upload URI:",
                        CommunicationController.ECHO_SERVER_URI + "TEXT", 140,
                        0);

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                ((UiApplication) StreamDataScreen.this.getApplication())
                        .popScreen(StreamDataScreen.this);
            }
        });

        final FullWidthButton postButton = new FullWidthButton("Upload Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

        _callback = new SendNonBlockXmlScreenCallback(this);

        _uriSenderField =
                new EditField("URI:", CommunicationController.ECHO_SERVER_URI
                        + "XML", 140, 0);
        final FullWidthButton postButton = new FullWidthButton("Get Data");
        postButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (!_pending) {
View Full Code Here

TOP

Related Classes of com.rim.samples.device.communicationapidemo.ui.FullWidthButton

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.