Package net.rim.device.api.ui.component

Examples of net.rim.device.api.ui.component.ButtonField


            } catch (final IOException e) {
                defaultHandlerName = toggleDefaultHandler();
            }

            _toggleButton =
                    new ButtonField("Default: " + defaultHandlerName,
                            ButtonField.NEVER_DIRTY | ButtonField.CONSUME_CLICK);

            _toggleButton.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(final Field field, final int context) {
                    final String newDefaultHandlerName = toggleDefaultHandler();
                    if (newDefaultHandlerName != null) {
                        _toggleButton.setLabel("default: "
                                + newDefaultHandlerName);
                    }
                }
            });

            _invokeButton =
                    new ButtonField("Invoke Handler", ButtonField.NEVER_DIRTY
                            | ButtonField.CONSUME_CLICK);

            _invokeButton.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(final Field field, final int context) {
                    doInvoke();
View Full Code Here


     */
    public void fieldChanged(final Field field, final int context) {
        if (field == _screen.getStartButton()) {
            startDetecting();

            final ButtonField startButton = _screen.getStartButton();
            final ButtonField stopButton = _screen.getStopButton();
            startButton.setEnabled(false);
            stopButton.setEnabled(true);
            stopButton.setFocus();
        } else if (field == _screen.getStopButton()) {
            stopDetecting();

            final ButtonField stopButton = _screen.getStopButton();
            final ButtonField startButton = _screen.getStartButton();
            stopButton.setEnabled(false);
            startButton.setEnabled(true);
            startButton.setFocus();
        }
    }
View Full Code Here

        add(hfm);

        add(new SeparatorField());

        // "Ok" button to close this screen
        final ButtonField okBtn =
                new ButtonField("Ok", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        okBtn.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(final Field field, final int context) {
                // Close this screen
                close();
            }
        });
View Full Code Here

         */
        NetworkAPIDemoScreen() {
            // Initialize UI components
            setTitle("Network API Demo");
            _transportInfoBtn =
                    new ButtonField("Transport Info", ButtonField.NEVER_DIRTY
                            | Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
            _connectionTestsBtn =
                    new ButtonField("Connection Tests", ButtonField.NEVER_DIRTY
                            | Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
            _udpBtn =
                    new ButtonField("UDP Client", ButtonField.NEVER_DIRTY
                            | Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);

            _transportInfoBtn.setChangeListener(this);
            _connectionTestsBtn.setChangeListener(this);
            _udpBtn.setChangeListener(this);
View Full Code Here

                new BasicEditField("URL:  ", _domain + SERVER_PORT, 128,
                        BasicEditField.FILTER_URL);

        final HorizontalFieldManager hfmButtons = new HorizontalFieldManager();
        _wifiButton =
                new ButtonField("TCP WiFi", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        _wifiButton.setChangeListener(this);
        _cellButton =
                new ButtonField("TCP Cellular", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        _cellButton.setChangeListener(this);
        hfmButtons.add(_wifiButton);
        hfmButtons.add(_cellButton);
View Full Code Here

        add(new SeparatorField());

        // Initialize button for displaying results in a browser field
        // or as raw HTML.
        _renderBtn =
                new ButtonField("Render HTML", ButtonField.NEVER_DIRTY
                        | Field.FIELD_HCENTER | ButtonField.CONSUME_CLICK);
        _renderBtn.setEnabled(false);
        _renderBtn.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.component.ButtonField

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.