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

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


        setTitle("Send Menu Demo");

        // Add an EditField which will be used to demonstrate the Send Menu API
        // with a textual context.
        _editField =
                new EditField("",
                        "Select text in this field and invoke the send menu");
        add(_editField);

        add(new SeparatorField());
View Full Code Here


                }

            }
        });

        _pathField = new EditField("Path:", PATH_STRING, 140, 0);
        _pathField.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
             */
            public void fieldChanged(final Field field, final int context) {
                updateSenderField();
            }
        });

        _uriSenderField = new EditField("Sender URI:", "", 140, 0);

        final FullWidthButton backButton = new FullWidthButton("Back");
        backButton.setChangeListener(new FieldChangeListener() {
            /**
             * @see FieldChangeListener#fieldChanged(Field, int)
View Full Code Here

     */
    void displayMessage() {
        // If the message does not exist then compose a new message
        if (_message == null) {
            // Add a To line
            final EditField toField =
                    new EditField("To: ", "", 40, BasicEditField.FILTER_EMAIL);
            addTextFieldToTableAndScreen(toField, Message.RecipientType.TO);

            // Add a subject line
            final EditField subjectField = new EditField("Subject: ", "");
            addTextFieldToTableAndScreen(subjectField, SUBJECT);

            // Add a separator between the body and the headers
            add(new SeparatorField());

            // Add a body field
            final EditField bodyField = new EditField();
            addTextFieldToTableAndScreen(bodyField, BODY);
        } else
        // The message exists so display it
        {
            displayHeader();
View Full Code Here

                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
                public void execute(final ReadOnlyCommandMetadata metadata,
                        final Object context) {
                    final EditField newField =
                            new EditField(_fieldLabelText, "");

                    // Find out where the last field of this type was added to
                    // the
                    // screen.
                    Vector fieldsByType = (Vector) _fieldTable.get(_headerType);
                    int lastInsertedIndex;
                    if (fieldsByType == null) {
                        // If a field of _headerType was not made yet, then
                        // create the
                        // vector which contains all of the fields of
                        // _headerType.
                        fieldsByType = new Vector();
                        _fieldTable.put(_headerType, fieldsByType);
                        lastInsertedIndex = getIndexForNewFieldType();
                    } else {
                        lastInsertedIndex =
                                getIndexOfLastFieldOfType(_headerType);
                    }

                    // Add the new field to both the screen and the vector
                    // keeping track
                    // of all the fields of the same type.
                    ComposeScreen.this.insert(newField, lastInsertedIndex + 1);
                    fieldsByType.addElement(newField);
                    newField.setFocus();
                }
            }));
        }
View Full Code Here

        _disallowBisB = new CheckboxField("Bis B", false);
        _disallowWifi = new CheckboxField("TCP Wifi", false);

        // Initialize TCP Cellular transport options
        _labelTcpCellular = new LabelField("TCP Cellular Options [optional]:");
        _tcpApn = new EditField("  APN: ", "");
        _tcpApnUser = new EditField("  Username: ", "");
        _tcpApnPassword = new EditField("  Password: ", "");

        // Initialize WAP transport options
        _labelWap = new LabelField("WAP Options [optional]:");
        _wapGatewayApn = new EditField("  Gateway APN: ", "");
        _wapGatewayIp = new EditField("  Gateway IP: ", "");
        _wapGatewayPort = new EditField("  Gateway Port: ", "");
        _wapSourceIp = new EditField("  Source IP: ", "");
        _wapSourcePort = new EditField("  Source Port: ", "");
        _wapUser = new EditField("  Username: ", "");
        _wapPassword = new EditField("  Password: ", "");

        _wapEnableWTLS = new CheckboxField("  Enable WTLS", false);

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

         * Default Constructor
         */
        public AddCategoryDialog() {
            super(Dialog.D_OK_CANCEL, "Add Category", Dialog.OK, null,
                    Dialog.GLOBAL_STATUS);
            _editField = new EditField("Name: ", "");
            add(_editField);
        }
View Full Code Here

        _sqlManager = sqlManager;
        _newItem = newItem;

        // Initialize UI components
        setTitle("Item Screen");
        _nameField = new EditField("Name: ", _item.getName());
        _locationField = new EditField("Address: ", _item.getLocation());
        _phoneField =
                new EditField("Phone: ", _item.getPhone(), 20,
                        BasicEditField.FILTER_PHONE);
        add(_nameField);
        add(_locationField);
        add(_phoneField);
    }
View Full Code Here

        final FieldSet fieldSetTwo =
                new FieldSet("Field Set 2", BorderFactory
                        .createBevelBorder(xyEdges), BorderFactory
                        .createRoundedBorder(xyEdges), Border.STYLE_SOLID);
        _editField =
                new EditField("", oldText, MAX_CHARS, Field.EDITABLE
                        | TextField.NO_NEWLINE);
        _editField.setBackground(BackgroundFactory
                .createSolidBackground(0xf6f6f6));
        _editField.setBorder(BorderFactory.createRoundedBorder(new XYEdges(4,
                4, 4, 4), 0xc6c6c6, Border.STYLE_SOLID));
View Full Code Here

        _wapOptionsScreen = new WapOptionsScreen(this);
        _mainScreen = new HTTPDemoScreen();
        _mainScreen.setTitle("HTTP Demo");

        _url =
                new EditField("URL: ", "http://", Integer.MAX_VALUE,
                        BasicEditField.FILTER_URL);
        _url.setCursorPosition(7);
        _mainScreen.add(_url);

        _mainScreen.add(new SeparatorField());
View Full Code Here

            }
        }));

        setTitle(new LabelField("Wap Options"));

        _gateway = new EditField("Gateway Port: ", null);
        _gatewayPort =
                new EditField("Gateway Port: ", WAP_DEFAULT_GWAYPORT,
                        TextField.DEFAULT_MAXCHARS,
                        BasicEditField.FILTER_INTEGER);
        _sourcePort =
                new EditField("Source Port: ", WAP_DEFAULT_SOURCEPORT,
                        TextField.DEFAULT_MAXCHARS,
                        BasicEditField.FILTER_INTEGER);
        _apn = new EditField("APN: ", null);
        _sourceIP = new EditField("Source IP: ", WAP_DEFAULT_SOURCEIP);

        add(_gateway);
        add(_gatewayPort);
        add(_apn);
        add(_sourcePort);
View Full Code Here

TOP

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

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.