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

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


        super(NO_VERTICAL_SCROLL);

        setTitle("Inverted Scrolling Screen");

        // Create a scrollable VerticalFieldManager
        final VerticalFieldManager topScrollingManager =
                new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR);

        // Add fields to the scrollable region, alternating background color
        for (int i = 0; i < 15; ++i) {
            final int color = colors[i % 2];
            topScrollingManager.add(new CustomField(color, i + 1
                    + " - This field is in the scrolling region"));
        }

        // Create edit field for input
        final TextField bottomInputField =
View Full Code Here


        // Cache if the device is a simulator or not
        final boolean isSim = DeviceInfo.isSimulator();

        // Add fields for displaying real time data
        _streamingManager = new VerticalFieldManager();
        _headingField = new TextField("Heading: ", "");
        _strengthField = new TextField("Field strength: ", "");
        _angleField = new TextField("Angle: ", "");
        _quaternionField = new TextField("Quaternion: ", "");
        _calibrationQualityField = new TextField("Calibration quality: ", "");
        _streamingManager.add(_headingField);
        _streamingManager.add(_angleField);
        _streamingManager.add(_quaternionField);
        _streamingManager.add(_strengthField);
        _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: ", "");
View Full Code Here

        gridFieldManager.add(_buttonFieldStar);
        gridFieldManager.add(_buttonFieldZero);
        gridFieldManager.add(_buttonFieldPound);

        // Add the GridFieldManager to a VerticalFieldManager
        final VerticalFieldManager vfm =
                new VerticalFieldManager(USE_ALL_WIDTH);
        vfm.add(gridFieldManager);

        // Add the HorizontalFieldManager to the screen
        add(vfm);
    }
View Full Code Here

        // Add the JustifiedHorizontalFieldManager to the screen
        add(jhfm);

        // Create a scrollable VerticalFieldManager
        final VerticalFieldManager scrollingRegion =
                new VerticalFieldManager(USE_ALL_HEIGHT | VERTICAL_SCROLL
                        | VERTICAL_SCROLLBAR);

        // Add fields to the scrollable region, alternating background color
        for (int i = 0; i < 15; ++i) {
            final int color = colors[i % 2];
            scrollingRegion.add(new CustomField(color, i + 1
                    + " - This field is in the scrolling region"));
        }

        // Add the VerticalFieldManager to the screen
        add(scrollingRegion);
View Full Code Here

             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    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);
View Full Code Here

        // Get the SVG field
        final Field _svgField = (Field) _animator.getTargetComponent();

        // Manager to lay out checkboxes
        final VerticalFieldManager vfm = new VerticalFieldManager();
        this.add(vfm);
        vfm.add(_svgField);

        // Initialize the event handlers
        _tabEventHandler = new TabEventHandler(this);
        _listPanel = new ListPanel(this);
        _buttonPanel = new ButtonPanel(this);
View Full Code Here

    /**
     * Displays the applications splash screen. Explains the game's controls and
     * objective. Allows the user to choose between using OpenGL v1.1 or v2.0.
     */
    private void displaySplashScreen() {
        final VerticalFieldManager vfm =
                new VerticalFieldManager(Manager.VERTICAL_SCROLL);

        // Initialize and add the logo to the splash screen
        final Bitmap bm = Bitmap.getBitmapResource("RandOmazeLogo.png");
        _bitmapField = new BitmapField(bm, Field.FIELD_HCENTER);
        _bitmapField.setMargin(0, 0, 0, 0);
        vfm.add(_bitmapField);

        // Initialize and add the instructions to the splash screen
        final String instructions =
                "The goal of the game is to move the character to the "
                        + "special end block without being hit by any of the obstacles.\n";
        _labelField = new LabelField(instructions);
        _labelField.setBorder(BorderFactory.createRoundedBorder(new XYEdges(10,
                10, 10, 10), Color.RED, Border.STYLE_SOLID));
        _labelField.setMargin(0, 10, 5, 10);
        vfm.add(_labelField);

        // Check if the device supports OpenGL v2.0
        if (GLUtils.isSupported(GLField.VERSION_2_0)) {
            // Set up the version array for the different GL
            // versions that the device supports.
            final String[] versions = new String[2];
            versions[0] = "OpenGL ES 1.1";

            versions[1] = "OpenGL ES 2.0";

            // Initialize and add the ObjectChoiceField that lets the users
            // choose what version of OpenGL they want to use.
            _glVersionField =
                    new ObjectChoiceField("", new String[] { "OpenGL ES 1.1",
                            "OpenGL ES 2.0" }, 1, Field.FIELD_HCENTER);
            vfm.add(_glVersionField);
        }

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

        // 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
        Ui.getUiEngineInstance().setAcceptableDirections(
View Full Code Here

    /**
     * Initializes the UI for the NFC Reader Demo application
     */
    private void buildUI() {
        // Initialize managers and buttons
        _targetInfo = new VerticalFieldManager();
        _responseStatus = new VerticalFieldManager();
        _listenerStatus = new VerticalFieldManager();

        _startButton = new WideButtonField("Start");
        _stopButton = new WideButtonField("Stop");
        _stopButton.setEnabled(false);
        DemoFieldChangeListener changeListener;
View Full Code Here

        // 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);
View Full Code Here

        _columnNames = new String[_columnCount];
        _cells = new String[_rowCount][_columnCount];
        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;
View Full Code Here

TOP

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

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.