Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.FieldChangeListener


        // Create a button to add a shortcut to this screen on the home screen
        _shortcutButton =
                new ButtonField("Add shortcut", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        _shortcutButton.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(final Field field, final int context) {
                addShortcut();
            }
        });
View Full Code Here


     */
    private void setChoiceField() {
        final String[] items = { "Bouncing Ball", "Running Stick", "Planets" };
        _options = new ObjectChoiceField("Samples:", items);

        _options.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(final Field field, final int context) {
                if ((context & ChoiceField.CONTEXT_CHANGE_OPTION) != 0) {
                    String elementId = null;
                    final int index = _options.getSelectedIndex();
                    switch (index) {
View Full Code Here

    /**
     * Lays out the button that starts the current animation.
     */
    private void setButtonField() {
        _playButton = new ButtonField("Play", ButtonField.CONSUME_CLICK);
        _playButton.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(final Field field, final int context) {
                activateElement(_currentAnimation);
            }
        });
    }
View Full Code Here

                        "Enter a destination URL and send a fire-and-forget message to it. "
                                + "Responses are not processed.",
                        Field.NON_FOCUSABLE);

        _isLocal = new CheckboxField("Local Address ", true);
        _isLocal.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                if (_isLocal.getChecked()) {
                    // Local
                    _pathField.setText(PATH_STRING);
                    updateSenderField();
                } else {
                    // Http
                    _pathField.setText("--NOT USED--");
                    _uriSenderField
                            .setText(CommunicationController.ECHO_SERVER_URI
                                    + "TEXT");
                }
            }
        });

        _pathField = new EditField("Path:", PATH_STRING, 140, 0);
        _pathField.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                updateSenderField();
            }
        });

        _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

        _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

                        "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

                                                                              // 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

                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

        /**
         * Indicates that an element in the field has been changed
         */
        private void fireFieldChanged() {
            final FieldChangeListener listener = getChangeListener();
            if (listener != null) {
                listener.fieldChanged(this, 0);
            }
        }
View Full Code Here

        _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 net.rim.device.api.ui.FieldChangeListener

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.