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

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


    /**
     * @see net.rim.blackberry.api.spellcheck.AbstractSpellCheckUIListener#spellCheckStarted(SpellCheckUI
     *      ui, Field field)
     */
    public boolean spellCheckStarted(final SpellCheckUI ui, final Field field) {
        final VerticalFieldManager vfm =
                new VerticalFieldManager(Field.FIELD_HCENTER);
        final StatusScreen popUp = new StatusScreen(vfm);
        final RichTextField rtf =
                new RichTextField("Spell check started",
                        RichTextField.USE_TEXT_WIDTH | Field.NON_FOCUSABLE);
        popUp.add(rtf);
View Full Code Here


         *
         * @param msg
         *            The message to display on the StatusScreen
         */
        private popUpRunner(final String msg) {
            final VerticalFieldManager vfm = new VerticalFieldManager();
            _popUp = new StatusScreen(vfm);
            _rtf =
                    new RichTextField(msg, RichTextField.USE_TEXT_WIDTH
                            | Field.NON_FOCUSABLE);
        }
View Full Code Here

            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                if (_testField.getText().length() == 0) {
                    Dialog.alert("Test field cannot be empty");
                } else {
                    final VerticalFieldManager vfm = new VerticalFieldManager();
                    _popUp = new PopupScreen(vfm);
                    final LabelField popUpLabel =
                            new LabelField("Correction for "
                                    + _testField.getText() + ":");
                    _correction = new EditField();
View Full Code Here

         * @param effect
         *            The name of the effect currently in use by the video
         *            recording Player
         */
        public ImageEffectDialog(final String effect) {
            super(new VerticalFieldManager());

            // Create radio buttons for the image effect choices
            _options = new RadioButtonGroup();
            final RadioButtonField none =
                    new RadioButtonField("None", _options, effect == null);
View Full Code Here

                        context.getHttpConnection().getURL(), null, context
                                .getRenderingApplication(), context
                                .getRenderingSession().getRenderingOptions(),
                        context.getFlags());

        final VerticalFieldManager vfm =
                new VerticalFieldManager(Manager.VERTICAL_SCROLL);

        vfm.add(new LabelField("Mime type: "));
        vfm.add(new LabelField(ACCEPT[0]));
        vfm.add(new SeparatorField());
        vfm.add(new LabelField("Content of the resource file: \n"));
        vfm.add(new SeparatorField());

        InputStream in = null;
        try {
            in = context.getInputStream();
            if (in == null) {
                in = context.getInputConnection().openInputStream();
            }

            final StringBuffer sb = new StringBuffer();
            int ch;
            while (-1 != (ch = in.read())) {
                sb.append((char) ch);
            }

            vfm.add(new LabelField(sb.toString()));
        } catch (final IOException ioe) {
            errorDialog(ioe.toString());
        } finally {
            if (in != null) {
                try {
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);
        verticalFieldManager.add(horizontalFieldManager4);
        verticalFieldManager.add(new SeparatorField());
        verticalFieldManager.add(_rdsTextField);
        verticalFieldManager.add(_logTextField);

        add(verticalFieldManager);
    }
View Full Code Here

    public SVGScreen() {
        setTitle("SVG Animator Demo");

        // Set up the components that allow the user to choose
        // an animation and then run it.
        final VerticalFieldManager vManager =
                new VerticalFieldManager(Manager.VERTICAL_SCROLL);
        final Manager fManager = new FlowFieldManager(Manager.VERTICAL_SCROLL);
        setChoiceField();
        fManager.add(_options);
        setButtonField();
        fManager.add(_playButton);

        vManager.add(fManager);
        add(vManager);

        // First animation is set to the bouncing ball animation by default.
        _currentAnimation = BOUNCING_BALL;
        try {
            // Load our svg image.
            _image = loadSVGImage(SAMPLE_URL);
            // Create an interactive svg animator which hosts our ui field.
            _animator = SVGAnimator.createAnimator(_image, FIELD_PACKAGE);
            // Get the ui field from the animator.
            _field =
                    (net.rim.device.api.ui.Field) _animator
                            .getTargetComponent();
            // Add the field to the screen.
            vManager.add(_field);
            _animator.play();
            _playButton.setFocus();

        } catch (final IOException e) {
            UiApplication.getUiApplication().invokeLater(new Runnable() {
View Full Code Here

         *
         * @param message
         *            the message to display; may be null.
         */
        public StatusScreen(final String message) {
            super(new VerticalFieldManager());
            this.add(new RichTextField(message));
        }
View Full Code Here

        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

        // 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");
        _bitmapArray[3] = Bitmap.getBitmapResource("building.jpg");

        // Add a bitmap field to the centered top content
        _bitmapField = new BitmapField(_bitmapArray[0], Field.FIELD_HCENTER);
        horizontalPositioning.add(_bitmapField);

        // Initialize an array of scroll entries
        final PictureScrollField.ScrollEntry[] entries =
                new PictureScrollField.ScrollEntry[4];
        entries[0] =
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.