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

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


        // Add fields to the screen
        add(_startButton);
        add(_stopButton);
        add(new LabelField("Detected targets will automatically be read"));

        add(new SeparatorField());
        add(new LabelField("Detected :"));
        add(_targetInfo);
        add(new SeparatorField());

        add(new LabelField("Response Status :"));
        add(_responseStatus);
        add(new SeparatorField());
        add(_listenerStatus);
    }
View Full Code Here


                new ButtonField("Show Options", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        _optionsBtn.setChangeListener(this);
        _optionsHidden = true;

        add(new SeparatorField());

        // Region to layout "Connect" and "Show Options" buttons side by side
        final HorizontalFieldManager hfmBtns =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        hfmBtns.add(connectBtn);
        hfmBtns.add(_optionsBtn);
        add(hfmBtns);

        add(new SeparatorField());

        _labelConnectionOpt = new LabelField("Connection Settings [optional]");

        // Connection mode
        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: ", "");

        // Add options to a VerticalFieldManager
        _optionFieldsManager = new VerticalFieldManager();
        _optionFieldsManager.add(_labelConnectionOpt);
        _optionFieldsManager.add(_connectionMode);
        _optionFieldsManager.add(_timeoutSupported);
        _optionFieldsManager.add(_endToEndRequired);
        _optionFieldsManager.add(_endToEndDesired);
        _optionFieldsManager.add(_connectionTimeout);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_labelRetriesOpt);
        _optionFieldsManager.add(_timeLimit);
        _optionFieldsManager.add(_attemptsLimit);
        _optionFieldsManager.add(_retryFactor);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_transportSelection);
        _optionFieldsManager.add(_order1);
        _optionFieldsManager.add(_order2);
        _optionFieldsManager.add(_order3);
        _optionFieldsManager.add(_order4);
        _optionFieldsManager.add(_order5);
        _optionFieldsManager.add(_order6);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_labelDisallowedTrasnports);
        _optionFieldsManager.add(_disallowDirectTCP);
        _optionFieldsManager.add(_disallowWap);
        _optionFieldsManager.add(_disallowWap2);
        _optionFieldsManager.add(_disallowMds);
        _optionFieldsManager.add(_disallowBisB);
        _optionFieldsManager.add(_disallowWifi);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_labelTcpCellular);
        _optionFieldsManager.add(_tcpApn);
        _optionFieldsManager.add(_tcpApnUser);
        _optionFieldsManager.add(_tcpApnPassword);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_labelWap);
        _optionFieldsManager.add(_wapGatewayApn);
        _optionFieldsManager.add(_wapGatewayIp);
        _optionFieldsManager.add(_wapGatewayPort);
        _optionFieldsManager.add(_wapUser);
        _optionFieldsManager.add(_wapPassword);
        _optionFieldsManager.add(_wapSourceIp);
        _optionFieldsManager.add(_wapSourcePort);
        _optionFieldsManager.add(_wapEnableWTLS);

        _optionFieldsManager.add(new SeparatorField());

        _optionFieldsManager.add(_labelBisB);
        _optionFieldsManager.add(_bisBConnectionType);

        _uiApp = UiApplication.getUiApplication();
View Full Code Here

                    new LabelField("Focus here and open the menu",
                            Field.FOCUSABLE);

            add(toggleDescription);
            add(_toggleButton);
            add(new SeparatorField());
            add(_invokeButton);
            add(new SeparatorField());
            add(_contentHandlerMenuLabel);

            setContextMenuProvider(new DefaultContextMenuProvider());
            _contentHandlerMenuLabel.setCommandItemProvider(this);
        }
View Full Code Here

            _iconToolbar.addIcon(bitmap4, " Applications ");

            // Add the IconToolbarComponent to the screen
            add(_iconToolbar);

            add(new SeparatorField());

            // Create TableComponent and add to the screen
            _tableComponent = new TableComponent(3, 4);
            add(_tableComponent);

            add(new SeparatorField());

            // Create ValueComponent and add to the screen
            _valueComponent = new ValueComponent(0, 50, 100);
            add(_valueComponent);

            add(new SeparatorField());

            // Create TextComponent and add to the screen
            _textComponent =
                    new TextComponent(
                            "Connect to everything you love in life through the power of a BlackBerry� smartphone");
View Full Code Here

        hfm.add(lVfm);
        hfm.add(rVfm);

        add(hfm);

        add(new SeparatorField());

        // "Ok" button to close this screen
        final ButtonField okBtn =
                new ButtonField("Ok", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
View Full Code Here

        _rtfDisplay = new RichTextField("Click a button");

        // Add components to screen --------------------------------------------
        add(_urlField);
        add(new SeparatorField());

        add(hfmButtons);
        add(_rtfDisplay);
    }
View Full Code Here

        browserFieldConfig.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED,
                Boolean.FALSE);

        _browserField = new BrowserField(browserFieldConfig);

        add(new SeparatorField());

        // Get the URL from the ConnectionDescriptor
        final String url = getUrl(connectionDescriptor);

        // Display transport and URL
        add(new LabelField("Transport: "
                + TransportInfo.getTransportTypeName(connectionDescriptor
                        .getTransportDescriptor().getTransportType())));
        add(new LabelField("Url: " + url));

        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)
             */
            public void fieldChanged(final Field field, final int context) {
                if (_renderRaw) {
                    renderRawContents();
                } else {
                    renderHtmlContents();
                }
            }
        });
        add(_renderBtn);

        add(new SeparatorField());

        // Display "Fetching content..." message below the buttons
        _contentsField =
                new RichTextField("Fetching content...", Field.NON_FOCUSABLE);
        add(_contentsField);

        add(new SeparatorField());

        // Start thread to read content
        final ContentReaderThread contentReader =
                new ContentReaderThread(url, connectionDescriptor);
        contentReader.start();
View Full Code Here

                new EditField("URL: ", "http://", Integer.MAX_VALUE,
                        BasicEditField.FILTER_URL);
        _url.setCursorPosition(7);
        _mainScreen.add(_url);

        _mainScreen.add(new SeparatorField());

        _content = new RichTextField();
        _mainScreen.add(_content);

        // Start the helper threads
View Full Code Here

TOP

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

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.