Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.Field


        super();

        _controller = new MemoController(memo);

        // Set the screen's title.
        final Field title =
                (Field) _controller.render(MemoController.FOR_TITLE);
        setTitle(title);

        // Add the various memo fields to the screen.
        final Field[] fields =
View Full Code Here


                                                                   // participants
                                                                   // in a
                                                                   // conference
                                                                   // call.
            {
                final Field field = getLeafFieldWithFocus();
                final int index = field.getIndex();

                if (index >= FIRST_PARTICIPANT_INDEX) {
                    menu.add(new DeleteParticipant(index
                            - FIRST_PARTICIPANT_INDEX, field));
                }
View Full Code Here

            // setting
            // not be used in most cases.
            // hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);

            // Initialize the camera object and video field
            final Field cameraField =
                    initializeCamera(new BarcodeDecoder(hints),
                            _imageDecoderListener);

            // If the field was constructed successfully, create the UI
            if (cameraField != null) {
View Full Code Here

                     *      Object)
                     */
                    public void execute(final ReadOnlyCommandMetadata metadata,
                            final Object context) {
                        _controller.addParticipant();
                        final Field field =
                                (Field) _controller.getFields(
                                        CallLogController.EDIT).lastElement();
                        AddConferencePhoneCallLogScreen.this.add(field);
                        AddConferencePhoneCallLogScreen.this.doPaint();
                    }
View Full Code Here

            // Retrieve the SVG animator, add it to the screen, and start the
            // SVG
            final SVGAnimator animator =
                    SVGAnimator.createAnimator(image,
                            "net.rim.device.api.ui.Field");
            final Field svgField = (Field) animator.getTargetComponent();

            add(svgField);
            animator.play();
        } catch (final IOException e) {
            add(new RichTextField("Could not load the svg file: " + e));
View Full Code Here

                final ConferencePhoneCallLog conferencePhoneCallLog =
                        (ConferencePhoneCallLog) _controller.getCallLog();
                menu.add(new AddParticipant());

                if (conferencePhoneCallLog.numberOfParticipants() > 2) {
                    final Field field = getLeafFieldWithFocus();
                    final int index = field.getIndex();

                    if (index >= FIRST_PARTICIPANT_INDEX) {
                        menu.add(new DeleteParticipant(index
                                - FIRST_PARTICIPANT_INDEX, field));
                    }
View Full Code Here

                    public void execute(final ReadOnlyCommandMetadata metadata,
                            final Object context) {
                        final ConferencePhoneCallLogController controller =
                                (ConferencePhoneCallLogController) _controller;
                        controller.addParticipant();
                        final Field field =
                                (Field) controller.getFields(
                                        CallLogController.EDIT).lastElement();
                        EditCallLogScreen.this.add(field);
                        EditCallLogScreen.this.doPaint();
                    }
View Full Code Here

         *
         * @param state
         *            The state that the player should be set to
         */
        public void setPlayState(final int state) {
            Field oldField, newField;

            switch (state) {
            case STATE_PLAYING:
                oldField = _playButton;
                newField = _pauseButton;
                break;
            case STATE_PAUSED:
            case STATE_STOPPED:
                oldField = _pauseButton;
                newField = _playButton;
                break;
            default:
                return;
            }

            final int index = oldField.getIndex();
            if (index >= 0) {
                replace(oldField, newField);
            }
        }
View Full Code Here

            } else if (index >= fieldCount) {
                index = fieldCount - 1;
            }

            for (int i = 0; i < fieldCount; i++) {
                final Field field = getField(i);
                if (field instanceof PlaylistEntryField) {
                    final PlaylistEntryField entryField =
                            (PlaylistEntryField) field;
                    if (i == index) {
                        entryField.setCurrent(true);
View Full Code Here

    /**
     * @see Manager#sublayout(int, int)
     */
    protected void sublayout(int width, int height) {
        Field firstField;
        Field secondField;
        if (_giveLeftFieldPriority) {
            firstField = _leftField;
            secondField = _rightField;
        } else {
            firstField = _rightField;
            secondField = _leftField;
        }

        int maxHeight = 0;

        final int leftFieldLeftMargin = _leftField.getMarginLeft();
        final int leftFieldRightMargin = _leftField.getMarginRight();
        final int rightFieldLeftMargin = _rightField.getMarginLeft();
        final int rightFieldRightMargin = _rightField.getMarginRight();

        final int firstFieldMarginBottom = firstField.getMarginBottom();
        final int firstFieldMarginTop = firstField.getMarginTop();
        final int secondFieldMarginBottom = secondField.getMarginBottom();
        final int secondFieldMarginTop = secondField.getMarginTop();

        int availableWidth = width;
        availableWidth -= leftFieldLeftMargin;
        availableWidth -= Math.max(leftFieldRightMargin, rightFieldLeftMargin);
        availableWidth -= rightFieldRightMargin;

        layoutChild(firstField, availableWidth, height - firstFieldMarginTop
                - firstFieldMarginBottom);
        maxHeight =
                Math.max(maxHeight, firstFieldMarginTop
                        + firstField.getHeight() + firstFieldMarginBottom);
        availableWidth -= firstField.getWidth();

        layoutChild(secondField, availableWidth, height - secondFieldMarginTop
                - secondFieldMarginBottom);
        maxHeight =
                Math.max(maxHeight, secondFieldMarginTop
                        + secondField.getHeight() + secondFieldMarginBottom);
        availableWidth -= secondField.getWidth();

        if (!isStyle(Field.USE_ALL_HEIGHT)) {
            height = maxHeight;
        }
        if (!isStyle(Field.USE_ALL_WIDTH)) {
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.Field

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.