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

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


        _mapManager.add(_svgField);

        // Initialize a hashtable for our check boxes.
        _checkboxes = new Hashtable(3);
        // Populates the hashtable, associates listeners with the checkbox
        final CheckboxField roadsCheckBox = new CheckboxField("Roads  ", true);
        final SVGElement roadsGroup =
                (SVGElement) _document.getElementById("roads");
        _checkboxes.put(roadsCheckBox, roadsGroup);

        final CheckboxField railsCheckBox =
                new CheckboxField("Railways  ", true);
        final SVGElement railsGroup =
                (SVGElement) _document.getElementById("railways");
        _checkboxes.put(railsCheckBox, railsGroup);

        final CheckboxField interestsCheckBox =
                new CheckboxField("Points of interest ", true);
        final SVGElement interestsGroup =
                (SVGElement) _document.getElementById("interests");
        _checkboxes.put(interestsCheckBox, interestsGroup);

        final CheckboxField restaurantCheckBox =
                new CheckboxField("Restaurants ", true);
        final SVGElement restaurantGroup =
                (SVGElement) _document.getElementById("restaurants");
        _checkboxes.put(restaurantCheckBox, restaurantGroup);

        // Set this class as the handler of the change listeners.
        roadsCheckBox.setChangeListener(this);
        railsCheckBox.setChangeListener(this);
        restaurantCheckBox.setChangeListener(this);
        interestsCheckBox.setChangeListener(this);

        // Adds the checkboxes to the layout manager.
        _checkboxManager.add(roadsCheckBox);
        _checkboxManager.add(railsCheckBox);
View Full Code Here


    /**
     * @see FieldChangeListener#fieldChanged(Field, int)
     */
    public void fieldChanged(final Field field, final int context) {
        final CheckboxField cbf = (CheckboxField) field;
        final SVGElement svgElement = (SVGElement) _checkboxes.get(cbf);

        // If the checkbox is checked change svg display trait.
        if (cbf.getChecked() == true) {
            _animator.invokeLater(new Runnable() {
                public void run() {
                    svgElement.setTrait("display", "inline");
                }
            });
View Full Code Here

                        Field.NON_FOCUSABLE);

        _uriReceiverField =
                new EditField("Receiver URI:", "local://" + PATH_STRING, 140, 0);

        _isBlocking = new CheckboxField("Blocking", false);
        _isBlocking.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                // Avoid conflict blocking and non-blocking destinations with
                // the same name
                if (_isBlocking.getChecked()) {
                    _uriReceiverField.setText("local://" + PATH_STRING + "9");
                } else {
                    _uriReceiverField.setText("local://" + PATH_STRING);
                }

            }
        });

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

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
View Full Code Here

                        "Default(m)", "Optimal Geolocation(s)",
                        "Optimal Geolocation(m)", "Cell Geolocation(s)",
                        "Cell Geolocation(m)", "WLAN Geolocation(s)",
                        "WLAN Geolocation(m)" }, 1);
        _enableGeolocationFallbackField =
                new CheckboxField("Enable Geolocation Fallback", false);
        _enableConcurrentGeolocationField =
                new CheckboxField("Enable Concurrent Geolocation", false);
        _isMapLocationField = new CheckboxField("Map Location", false);
        _useGPSRestartIntervalField =
                new CheckboxField("GPS Restart Interval?", false);
        _isSatelliteInfoRequiredField =
                new CheckboxField("Satellite information required?", false);
        _isVerizonField = new CheckboxField("Verizon?", false);
        _failOverModeField =
                new ObjectChoiceField("Failover Mode: ",
                        new String[] { "Stand Alone", "Data Optimal",
                                "Speed Optimal", "MS-Based",
                                "Accuracy Optimal", "PDE Calculate", "None" },
View Full Code Here

        // Initialize UI components

        _uriReceiverField = new EditField("Receiver URI:", PATH_STRING, 140, 0);

        _isBlocking = new CheckboxField("Blocking", false);
        _isBlocking.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                // Avoid conflict blocking and non-blocking destinations with
                // the same name
                if (_isBlocking.getChecked()) {
                    _uriReceiverField.setText(PATH_STRING + "9");
                } else {
                    _uriReceiverField.setText(PATH_STRING);
                }
            }
        });

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

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
View Full Code Here

     */
    public SendFireForgetScreen(final CommunicationController controller) {
        setTitle("Send IPC Messages (Fire-and-Forget)");

        // Initialize UI components
        _isLocal = new CheckboxField("Local Address ", true);
        _isLocal.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
View Full Code Here

         */
        _editField = new BasicEditField("Basic Edit Field: ", "");
        add(_editField);

        // Create one check box per direction
        _northCheckbox = new CheckboxField("Allow north orientation?", true);
        _eastCheckbox = new CheckboxField("Allow east orientation?", true);
        _westCheckbox = new CheckboxField("Allow west orientation?", true);

        // Set change listeners and add to the screen
        _northCheckbox.setChangeListener(this);
        _eastCheckbox.setChangeListener(this);
        _westCheckbox.setChangeListener(this);
View Full Code Here

            }

            if (!checked) {
                // If no checkboxes are checked, all directions will be allowed.
                // We won't allow the user to uncheck all checkboxes.
                final CheckboxField checkboxField = (CheckboxField) field;
                checkboxField.setChecked(true);
                Dialog.alert("Please allow at least one direction");
            } else {
                // Set the acceptable directions and then force the app to check
                // if the screen requires a rotation.
                final UiEngineInstance ui = Ui.getUiEngineInstance();
View Full Code Here

        final String[] connectionModes = { "READ", "WRITE", "READ/WRITE" };
        _connectionMode =
                new ObjectChoiceField("  Connection Mode: ", connectionModes, 2);

        // Connection timeout
        _timeoutSupported = new CheckboxField("  Support timeouts", false);
        _connectionTimeout =
                new BasicEditField("Connection timeout: ", "", 6,
                        BasicEditField.FILTER_INTEGER);

        // Connection security settings for tls/ssl
        _endToEndRequired =
                new CheckboxField("  tls/ssl end to end required", false);
        _endToEndDesired =
                new CheckboxField("  tls/ssl end to end desired", false);

        // Connection retry options
        _labelRetriesOpt = new LabelField("Retry options [optional]");
        _timeLimit =
                new BasicEditField("  Time Limit for Connections: ", "0", 6,
                        BasicEditField.FILTER_INTEGER);
        _attemptsLimit =
                new BasicEditField("  Attempts Limit: ", "0", 4,
                        BasicEditField.FILTER_INTEGER);
        _retryFactor =
                new BasicEditField("  Retry Factor: ", "0", 6,
                        BasicEditField.FILTER_INTEGER);

        // Transport selection
        final String[] transportNames =
                { "none", "TCP Cellular", "Wap", "Wap2", "Mds", "Bis B",
                        "TCP Wifi" };

        // Preferred transport types option
        _transportSelection =
                new CheckboxField("Preferred Transport Types [Optional]", false);
        _transportSelection.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(final Field field, final int context) {
                if (_transportSelection.getChecked()) {
                    // Transport selection check box is checked. Enable drop
                    // downs for choosing the preferred transport.
                    _order1.setEditable(true);
                    _order2.setEditable(true);
                    _order3.setEditable(true);
                    _order4.setEditable(true);
                    _order5.setEditable(true);
                    _order6.setEditable(true);
                } else {
                    // Transport selection check box is not checked. Disable
                    // drop
                    // downs for choosing the preferred transport and set them
                    // to
                    // "none".
                    _order1.setSelectedIndex(0);
                    _order1.setEditable(false);
                    _order2.setSelectedIndex(0);
                    _order2.setEditable(false);
                    _order3.setSelectedIndex(0);
                    _order3.setEditable(false);
                    _order4.setSelectedIndex(0);
                    _order4.setEditable(false);
                    _order5.setSelectedIndex(0);
                    _order5.setEditable(false);
                    _order6.setSelectedIndex(0);
                    _order6.setEditable(false);
                }
            }
        });

        // Initialize preferred transport types option.
        // By default disable the options.
        _order1 = new ObjectChoiceField("First:", transportNames);
        _order1.setEditable(false);
        _order2 = new ObjectChoiceField("Second:", transportNames);
        _order2.setEditable(false);
        _order3 = new ObjectChoiceField("Third:", transportNames);
        _order3.setEditable(false);
        _order4 = new ObjectChoiceField("Forth:", transportNames);
        _order4.setEditable(false);
        _order5 = new ObjectChoiceField("Fifth:", transportNames);
        _order5.setEditable(false);
        _order6 = new ObjectChoiceField("Sixth:", transportNames);
        _order6.setEditable(false);

        // Initialize disallowed transport types check boxes
        _labelDisallowedTrasnports =
                new LabelField("Disallowed Transport Types [optional]:");
        _disallowDirectTCP = new CheckboxField("TCP Cellular", false);
        _disallowWap = new CheckboxField("Wap", false);
        _disallowWap2 = new CheckboxField("Wap2", false);
        _disallowMds = new CheckboxField("Mds", false);
        _disallowBisB = new CheckboxField("Bis B", false);
        _disallowWifi = new CheckboxField("TCP Wifi", false);

        // Initialize TCP Cellular transport options
        _labelTcpCellular = new LabelField("TCP Cellular Options [optional]:");
        _tcpApn = new EditField("  APN: ", "");
        _tcpApnUser = new EditField("  Username: ", "");
        _tcpApnPassword = new EditField("  Password: ", "");

        // Initialize WAP transport options
        _labelWap = new LabelField("WAP Options [optional]:");
        _wapGatewayApn = new EditField("  Gateway APN: ", "");
        _wapGatewayIp = new EditField("  Gateway IP: ", "");
        _wapGatewayPort = new EditField("  Gateway Port: ", "");
        _wapSourceIp = new EditField("  Source IP: ", "");
        _wapSourcePort = new EditField("  Source Port: ", "");
        _wapUser = new EditField("  Username: ", "");
        _wapPassword = new EditField("  Password: ", "");

        _wapEnableWTLS = new CheckboxField("  Enable WTLS", false);

        // Initialize BisB transport options
        _labelBisB = new LabelField("BisB Options [mandatory for BisB]");
        _bisBConnectionType = new EditField("  Connection Type: ", "");
View Full Code Here

                        .createSimpleBorder(xyEdges), Border.STYLE_SOLID);
        _objectChoiceField =
                new ObjectChoiceField("Choices: ", new String[] { "RIM",
                        "Options", "Demo" }, index);
        _checkboxField =
                new CheckboxField("Checkbox: ", checked, Field.FIELD_TRAILING
                        | Field.USE_ALL_WIDTH);
        fieldSetOne.add(_objectChoiceField);
        fieldSetOne.add(_checkboxField);
        fieldSetOne.setMargin(2, 5, 5, 5);
        fieldSetOne.setBackground(BackgroundFactory
View Full Code Here

TOP

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

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.