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

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


     *
     * @return True if screen data is valid; otherwise false;
     */
    public boolean isDataValid() {
        // Can't save a memo without a title.
        final LabelField title =
                (LabelField) _controller.render(MemoController.FOR_TITLE);

        if (title.getText().length() == 0) {
            Dialog.alert("Title must have a value.");
            return false;
        }
        return true;
    }
View Full Code Here


                    } else {
                        text = "Conference call";
                    }

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

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

    /**
     * Creates a new BluetoothSerialPortDemo object
     */
    private BluetoothSerialPortDemo() {
        final BluetoothDemoScreen mainScreen = new BluetoothDemoScreen();
        mainScreen.setTitle(new LabelField("Bluetooth Serial Port Demo",
                Field.USE_ALL_WIDTH));

        _infoField = new EditField(Field.READONLY);
        mainScreen.add(_infoField);

View Full Code Here

        if (attached) {
            try {
                _browserField.requestContent(_request);
            } catch (final Exception e) {
                deleteAll();
                add(new LabelField("ERROR:\n\n"));
                add(new LabelField(e.getMessage()));
            }
        }
    }
View Full Code Here

                }
            }));

            addMenuItem(listenItem);
        } else {
            add(new LabelField("Bluetooth is not supported on this device."));
        }
    }
View Full Code Here

        _pictureDirectoryURL = pictureDirectoryURL;
        _pictureFileNames = pictureFileNames;

        setTitle("Secondary Screen");

        add(new LabelField("Select an image:", Field.FIELD_HCENTER));

        final DemoVerticalFieldManager vfm =
                new DemoVerticalFieldManager(Manager.NO_VERTICAL_SCROLL);

        // Create a SimpleList to display the available image names
        _picturesList = new SimpleList(vfm);

        for (int i = 0; i < _pictureFileNames.size(); i++) {
            _picturesList.add((String) _pictureFileNames.elementAt(i));
        }

        _picturesList.setCommand(new Command(new CommandHandler() {
            /**
             * @see CommandHandler#execute(ReadOnlyCommandMetadata, Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                setImage();
            }
        }));

        add(vfm);

        final SeparatorField separator = new SeparatorField();
        separator.setPadding(50, 0, 0, 0);
        add(separator);
        add(new LabelField("Add shortcut to the home screen",
                Field.FIELD_HCENTER));
        add(new SeparatorField());

        _homeScreenLocationPicker = HomeScreenLocationPicker.create();
        add(_homeScreenLocationPicker);
View Full Code Here

        // Close the viewfinder first
        UiApplication.getUiApplication().popScreen(_vfScreen);

        final MainScreen resultsScreen = new MainScreen();

        final LabelField text =
                new LabelField("Barcode Text: " + result.getText());
        text.setPadding(4, 4, 4, 4);

        final LabelField type =
                new LabelField("Barcode Type: "
                        + result.getBarcodeFormat().toString());
        type.setPadding(4, 4, 4, 4);

        final TransitionContext context =
                new TransitionContext(TransitionContext.TRANSITION_SLIDE);
        context.setIntAttribute(TransitionContext.ATTR_DIRECTION,
                TransitionContext.KIND_OUT);
View Full Code Here

        // Creates a new AddPhoneCallLogScreen object
        public AddPhoneCallLogScreen() {
            super();

            setTitle(new LabelField("Add Phone Call Log"));

            _controller = new PhoneCallLogController();
            final Vector fields = _controller.getFields(CallLogController.ADD);
            final int numFields = fields.size();
View Full Code Here

            title = "Edit Order Record";
        } else {
            title = "View Order Record";
        }

        setTitle(new LabelField(title));

        _controller = new OrderRecordController(orderRecord, editable);
        final Vector fields = _controller.getFields();
        final int numFields = fields.size();
View Full Code Here

    /**
     * Makes this screen editable.
     */
    private void makeEditScreen() {
        setTitle(new LabelField("Edit Order Record"));
        _editable = true;
        _controller.makeEditable();
    }
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.