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

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


        _cancelButton =
                new ButtonField("Cancel", Field.FIELD_HCENTER
                        | ButtonField.CONSUME_CLICK);
        _cancelButton.setChangeListener(this);

        final HorizontalFieldManager hfm =
                new HorizontalFieldManager(Field.FIELD_HCENTER
                        | Field.FIELD_VCENTER);
        hfm.add(_okButton);
        hfm.add(_cancelButton);
        add(hfm);
    }
View Full Code Here


                            new LabelField("Correction for "
                                    + _testField.getText() + ":");
                    _correction = new EditField();
                    _popUp.add(popUpLabel);
                    _popUp.add(_correction);
                    final HorizontalFieldManager hfm =
                            new HorizontalFieldManager(Field.FIELD_HCENTER);
                    hfm.add(new OkButton());
                    hfm.add(new CancelButton());
                    _popUp.add(hfm);
                    _app.pushScreen(_popUp);
                }
            }
        }));
View Full Code Here

     * Lays out the UI elements on the screen
     */
    private void createLayout() {
        final VerticalFieldManager verticalFieldManager =
                new VerticalFieldManager(Field.FIELD_HCENTER);
        final HorizontalFieldManager horizontalFieldManager1 =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        final HorizontalFieldManager horizontalFieldManager2 =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        final HorizontalFieldManager horizontalFieldManager3 =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        final HorizontalFieldManager horizontalFieldManager4 =
                new HorizontalFieldManager(Field.FIELD_HCENTER);

        horizontalFieldManager1.add(_setFrequencyButton);

        horizontalFieldManager2.add(_seekDownButton);
        horizontalFieldManager2.add(_seekUpButton);

        horizontalFieldManager3.add(_decreaseRSSIButton);
        horizontalFieldManager3.add(_rssiLabel);
        horizontalFieldManager3.add(_increaseRSSIButton);

        horizontalFieldManager4.add(_playButton);

        verticalFieldManager.add(_frequencyTextField);
        verticalFieldManager.add(horizontalFieldManager1);
        verticalFieldManager.add(horizontalFieldManager2);
        verticalFieldManager.add(horizontalFieldManager3);
View Full Code Here

            _startPlayingButton.setChangeListener(this);
            _stopPlayingButton.setChangeListener(this);
            _resetField.setChangeListener(this);

            // Add the player control buttons to the screen
            final HorizontalFieldManager buttonlist =
                    new HorizontalFieldManager();
            buttonlist.add(_startPlayingButton);
            buttonlist.add(_stopPlayingButton);
            buttonlist.add(_resetField);
            add(buttonlist);

            // Create and add the field with the load progress
            _loadStatusField =
                    new BasicEditField("Load: ", "0 Bytes", 10,
View Full Code Here

     * Initializes UI Components and adds them to the screen
     */
    private void createUI() {
        delete(_statusField);

        _hfm1 = new HorizontalFieldManager(Field.FIELD_HCENTER);
        _controlButton =
                new ButtonField("Start", ButtonField.NEVER_DIRTY
                        | ButtonField.CONSUME_CLICK);
        _controlButton.setChangeListener(this);
        _hfm1.add(_controlButton);

        _hfm2 = new HorizontalFieldManager(Field.FIELD_HCENTER);
        _currentTime = new LabelField("-");
        _duration = new LabelField("- s");
        _volumeDisplay =
                new LabelField("Volume : " + _volumeControl.getLevel());
        _hfm2.add(_currentTime);
View Full Code Here

        super(NO_VERTICAL_SCROLL);

        setTitle("Horizontal Vertical Centered Screen");

        // Center a field on the screen using managers
        final HorizontalFieldManager hfm =
                new HorizontalFieldManager(USE_ALL_HEIGHT);
        final VerticalFieldManager vfm =
                new VerticalFieldManager(USE_ALL_WIDTH | FIELD_VCENTER);
        vfm.add(new LabelField("Centered text", FIELD_HCENTER));
        hfm.add(vfm);
        add(hfm);
    }
View Full Code Here

        super(NO_VERTICAL_SCROLL);

        setTitle("Media Hub Screen");

        // Create the centered top content
        final HorizontalFieldManager topCenteredArea =
                new HorizontalFieldManager(USE_ALL_HEIGHT | USE_ALL_WIDTH
                        | NO_HORIZONTAL_SCROLL);
        final VerticalFieldManager horizontalPositioning =
                new VerticalFieldManager(USE_ALL_WIDTH | NO_VERTICAL_SCROLL
                        | Field.FIELD_VCENTER);
        topCenteredArea.add(horizontalPositioning);

        // Initialize the bitmap array
        _bitmapArray[0] = Bitmap.getBitmapResource("berry.jpg");
        _bitmapArray[1] = Bitmap.getBitmapResource("logo_blue.jpg");
        _bitmapArray[2] = Bitmap.getBitmapResource("logo_black.jpg");
View Full Code Here

        _streamingManager.add(_calibrationQualityField);
        _streamingManager.setPadding(4, 4, 4, 4);
        add(_streamingManager);

        // Add HorizontalFieldManager for buttons
        final HorizontalFieldManager buttonManager =
                new HorizontalFieldManager(FIELD_HCENTER);
        _snapshotButton = new ButtonField("Snapshot");
        _calibrateButton = new ButtonField("Calibrate");
        _snapshotButton.setChangeListener(this);
        _calibrateButton.setChangeListener(this);
        buttonManager.add(_snapshotButton);
        buttonManager.add(_calibrateButton);
        add(buttonManager);

        add(new SeparatorField());

        // Add fields for displaying snapshot data
        _snapshotManager = new VerticalFieldManager();
        _snapshotHeadingField = new TextField("Snapshot heading: ", "");
        _snapshotAngleField = new TextField("Snapshot angle: ", "");
        _snapshotStrengthField = new TextField("Snapshot field strength: ", "");
        _snapshotQualityField =
                new TextField("Snapshot calibration quality: ", "");
        _snapshotQuaternionField = new TextField("Snapshot quaternion: ", "");
        _snapshotManager.add(_snapshotHeadingField);
        _snapshotManager.add(_snapshotAngleField);
        _snapshotManager.add(_snapshotQuaternionField);
        _snapshotManager.add(_snapshotStrengthField);
        _snapshotManager.add(_snapshotQualityField);
        _snapshotManager.setPadding(4, 4, 4, 4);
        add(_snapshotManager);

        add(new SeparatorField());

        // The magnetometer channel will be opened with a sampling
        // frequency of 10 hertz and will be active only when the app
        // is in the foreground. This is the default configuration
        // that would be set automatically if the no arg constructor
        // for MagnetometerChannelConfig was used.
        final MagnetometerChannelConfig mcc =
                new MagnetometerChannelConfig(10, true, false);

        // Open up the magnetometer channel for reading data and
        // set this class as a MagnetometerListener.
        _magnetometerChannel = MagnetometerSensor.openChannel(app, mcc);
        _magnetometerChannel.addMagnetometerListener(this);

        // Cache the application for use later
        _app = app;

        // Start looking for the device's location and initialize
        // the GeomagneticField if on a real device.
        if (!isSim) {
            // Add the declination fields only if on a real device
            _declinationField = new TextField("Declination: ", "");
            _streamingManager.add(_declinationField);

            _snapshotDeclinationField =
                    new TextField("Snapshot declination: ", "");
            _snapshotManager.add(_snapshotDeclinationField);

            // Add field for displaying location status
            _locationInfo = new TextField("Location status: ", "");
            add(_locationInfo);

            // Add HorizontalFieldManager for the location information
            _locationManager = new HorizontalFieldManager(FIELD_HCENTER);
            add(_locationManager);

            _latitude = new TextField("Latitude : ", "");
            _longitude = new TextField("Longitude : ", "");
            _altitude = new TextField("Altitude : ", "");
View Full Code Here

                    final Object context) {
                final VerticalFieldManager vfm = new VerticalFieldManager();
                _popUp = new PopupScreen(vfm);
                _addAttendeeField = new EditField("Enter Name: ", "");
                _popUp.add(_addAttendeeField);
                final HorizontalFieldManager hfm =
                        new HorizontalFieldManager(Field.FIELD_HCENTER);
                hfm.add(new AddButton());
                hfm.add(new CancelButton());
                _popUp.add(hfm);
                _uiApp.pushScreen(_popUp);
            }
        }));
View Full Code Here

                new EditField("Type a message to send: \n", "", 256,
                        Field.USE_ALL_HEIGHT);
        verticalManager.add(_messageField);
        add(verticalManager);

        final HorizontalFieldManager hfm =
                new HorizontalFieldManager(Field.FIELD_HCENTER);
        _sendButton = new ButtonField("Send", ButtonField.CONSUME_CLICK);
        _sendButton.setChangeListener(this);
        _clearButton = new ButtonField("Clear", ButtonField.CONSUME_CLICK);
        _clearButton.setChangeListener(this);
        hfm.add(_sendButton);
        hfm.add(_clearButton);
        add(hfm);

        _statusField = new LabelField();
        add(_statusField);
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.