Package net.rim.device.api.ui.container

Examples of net.rim.device.api.ui.container.HorizontalFieldManager


        // Initialize "Start" button
        _startButton = new ButtonField("Start", Field.FIELD_HCENTER);
        _startButton.setChangeListener(this);

        // Add buttons
        final HorizontalFieldManager hfm =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        hfm.add(_controlsButton);
        hfm.add(_startButton);
        vfm.add(hfm);

        add(vfm);

        // Disable screen rotation and context menu
View Full Code Here


        _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]");
View Full Code Here

        final VerticalFieldManager[] columns =
                new VerticalFieldManager[columnCount];
        for (int i = 0; i < _columnCount; i++) {
            columns[i] = new VerticalFieldManager();
            for (int j = 0; j < _rowCount; j++) {
                final HorizontalFieldManager hfm = new HorizontalFieldManager();

                final String text = "TC" + "(" + i + ", " + j + ")";
                _cells[j][i] = text;
                hfm.add(new LabelField(text));
                hfm.add(new LabelField("   |   "));
                columns[i].add(hfm);
            }

            add(columns[i]);
        }
View Full Code Here

    public TransportInfoScreen() {
        setTitle("Transport Info");

        // Regions to display "Availability" status in the left column and
        // "Coverage" status in the right column
        final HorizontalFieldManager hfm =
                new HorizontalFieldManager(Manager.NO_VERTICAL_SCROLL);
        final VerticalFieldManager lVfm =
                new HalfWidthVerticalFieldManager(Manager.NO_HORIZONTAL_SCROLL
                        | Field.FIELD_LEFT);
        final VerticalFieldManager rVfm =
                new HalfWidthVerticalFieldManager(Manager.NO_HORIZONTAL_SCROLL
                        | Field.FIELD_RIGHT);

        // Calculate column with (half of screen width)
        final int halfDisplayWidth = Display.getWidth() / 2;

        // Display "Availability" status for all transports
        _availabilityCheckboxes = new CheckboxField[NUM_TRANSPORTS];
        _coverageCheckboxes = new CheckboxField[NUM_TRANSPORTS];
        lVfm.add(new FixedWidthLabelField("Availability", halfDisplayWidth));
        for (int i = 0; i < NUM_TRANSPORTS; i++) {
            final int currentTransport = i + 1;
            final String transportName =
                    TransportInfo.getTransportTypeName(currentTransport);
            final boolean transportAvailable =
                    TransportInfo.isTransportTypeAvailable(currentTransport);
            _availabilityCheckboxes[i] =
                    new CheckboxField(transportName, transportAvailable,
                            Field.NON_FOCUSABLE);
            _availabilityCheckboxes[i].setEnabled(false);
            lVfm.add(_availabilityCheckboxes[i]);
        }

        // Display "Coverage" status for all transports
        rVfm.add(new FixedWidthLabelField("Coverage", halfDisplayWidth));
        for (int i = 0; i < NUM_TRANSPORTS; i++) {
            final int currentTransport = i + 1;
            final String transportName =
                    TransportInfo.getTransportTypeName(currentTransport);
            final boolean coverageAvailable =
                    TransportInfo.hasSufficientCoverage(currentTransport);
            _coverageCheckboxes[i] =
                    new CheckboxField(transportName, coverageAvailable,
                            Field.NON_FOCUSABLE);
            _coverageCheckboxes[i].setEnabled(false);
            rVfm.add(_coverageCheckboxes[i]);
        }

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

        add(hfm);

        add(new SeparatorField());
View Full Code Here

        _urlField =
                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);

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

        // Add components to screen --------------------------------------------
        add(_urlField);
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.container.HorizontalFieldManager

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.