Package net.rim.device.api.ui.component

Examples of net.rim.device.api.ui.component.LabelField


        // Create a data template that will format the model data as an array of
        // LabelFields
        final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
            public Field[] getDataFields(final int modelRowIndex) {
                final Field[] fields =
                        { new LabelField("Waypoint " + modelRowIndex,
                                DrawStyle.ELLIPSIS | Field.NON_FOCUSABLE) };

                return fields;
            }
        };
View Full Code Here


        _uiApp = (PersistentStoreDemo) UiApplication.getUiApplication();
        _meetings = meetings;

        // Initialize UI components
        setTitle(new LabelField("Persistent Store Demo", DrawStyle.ELLIPSIS
                | Field.USE_ALL_WIDTH));

        // Create an adapter to display meetings list in a table
        _model = new MeetingTableModelAdapter();

        // Create the view and controller
        _view = new TableView(_model);
        final TableController controller = new TableController(_model, _view);
        controller.setFocusPolicy(TableController.ROW_FOCUS);
        _view.setController(controller);

        _view.setDataTemplateFocus(BackgroundFactory
                .createLinearGradientBackground(Color.LIGHTBLUE,
                        Color.LIGHTBLUE, Color.BLUE, Color.BLUE));
        final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
            public Field[] getDataFields(final int modelRowIndex) {
                final String text =
                        ((Meeting) _model.getRow(modelRowIndex))
                                .getField(Meeting.MEETING_NAME);
                final Field[] fields =
                        { new LabelField(text, Field.NON_FOCUSABLE) };

                return fields;
            }
        };
        dataTemplate.createRegion(new XYRect(0, 0, 1, 1));
View Full Code Here

            public void fieldChanged(final Field field, final int context) {
                menuManager.showSendNonBlockXmlScreen();
            }
        });

        final LabelField instructions =
                new LabelField("Request and parse data from echo server.",
                        Field.NON_FOCUSABLE);

        // Add UI components to screen
        add(atomBtn);
        add(jsonBtn);
View Full Code Here

    /**
     * Creates a new SocketDemoScreen object
     */
    public SocketDemoScreen() {
        setTitle(new LabelField("Socket Demo"));

        add(new RichTextField(
                "Enter local host name in the field below and select 'Go' from the menu.",
                Field.NON_FOCUSABLE));
        add(new SeparatorField());
View Full Code Here

     */
    private void createUI() {
        setTitle("Unified Search Demo");

        // Add a label for the list
        _listTitle = new LabelField("Data: ", Field.USE_ALL_WIDTH);
        _listTitle.setBackground(BackgroundFactory
                .createSolidTransparentBackground(Color.DARKBLUE, 128));
        add(_listTitle);

        // Create list field
View Full Code Here

        _action = new AttachmentAction(this);

        // Initialize UI
        setTitle("Attachment Demo");
        _statusField =
                new LabelField(
                        "Open the menu to download or upload attachments",
                        Field.NON_FOCUSABLE);
        add(_statusField);
        final MenuItem downloadItem =
                new MenuItem(new StringProvider("Download Attachments"),
View Full Code Here

        // Create a data template that will format the model data as an array of
        // LabelFields
        final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
            public Field[] getDataFields(final int modelRowIndex) {
                final Field[] fields =
                        { new LabelField(((SampleContact) _model
                                .getRow(modelRowIndex)).toString(),
                                DrawStyle.ELLIPSIS | Field.NON_FOCUSABLE) };

                return fields;
            }
View Full Code Here

                text = null;
            }
        }

        // Setup the screen
        final LabelField titleField =
                new LabelField(title != null ? title : "Test Application");
        titleField.setFont(titleField.getFont().derive(
                Font.BOLD | Font.UNDERLINED));
        this.add(titleField);

        if (text != null) {
            this.add(new SeparatorField());
            this.add(new LabelField(text));
        }

        this._manager = manager;
        this._scrollAmount = titleField.getFont().getHeight();
    }
View Full Code Here

                } else {
                    text = fileholder.getFileName();
                }

                final Field[] fields =
                        { new LabelField(text, DrawStyle.ELLIPSIS
                                | Field.NON_FOCUSABLE) };

                return fields;
            }
        };
View Full Code Here

        _subjectField = new EditField("Subject:", "");
        add(_subjectField);
        _messageField = new EditField("Message:", "");
        add(_messageField);
        add(new SeparatorField());
        final LabelField attachmentText = new LabelField("Attachments");
        add(attachmentText);

        // Create table components
        _view = new TableView(_app.getMessageParts());
        final TableController controller =
                new TableController(_app.getMessageParts(), _view);
        controller.setFocusPolicy(TableController.ROW_FOCUS);
        _view.setController(controller);

        // Set the highlight style for the view
        _view.setDataTemplateFocus(BackgroundFactory
                .createLinearGradientBackground(Color.LIGHTBLUE,
                        Color.LIGHTBLUE, Color.BLUE, Color.BLUE));

        // Create a data template that will format the model data as an array of
        // LabelFields
        final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
            public Field[] getDataFields(final int modelRowIndex) {
                final MessagePart message =
                        (MessagePart) _app.getMessageParts().getRow(
                                modelRowIndex);
                final Field[] fields =
                        { new LabelField(message.getContentLocation(),
                                Field.NON_FOCUSABLE | DrawStyle.ELLIPSIS) };
                return fields;
            }
        };
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.component.LabelField

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.