Package com.smartgwt.client.widgets.form.fields

Examples of com.smartgwt.client.widgets.form.fields.TextItem


    public final DynamicForm formTheme(final String name, final String description, final int action, final int father) {
        final int widthForm = 430;
        final int heightForm = 85;
        final DynamicForm form = configureForm(widthForm, heightForm);

        final TextItem nameItem = new TextItem("fName");
        configureFormsItems(nameItem, WIDTH_FIELD, HEIGHT_FIELD, constants.nameTheme(), name);

        final TextAreaItem descriptionItem = new TextAreaItem("fDescription");
        configureFormsItems(descriptionItem, WIDTH_FIELD, HEIGHT_FIELD_AREA, constants.description(), description);
        descriptionItem.setTitleVAlign(VerticalAlignment.TOP);
View Full Code Here


     * @return
     */
    private DynamicForm addFormPerson(String name, String id_group, String group, boolean store, final int action) {
        final DynamicForm form = configureForm(430, 85);
        //item with the name
        final TextItem nameItem = new TextItem("fName");
        configureFormsItems(nameItem, 250, 5, constants.namePerson(), name);

        //item with the group
        SelectItem groupItem = new SelectItem("fGroup");
        groupItem.setTitle(constants.group());
View Full Code Here

        final int widthForm = 20;
        final int heightForm = 85;       
        form.setWidth(widthForm);
        form.setHeight(heightForm);

        final TextItem nameItem = new TextItem("fName");
        configureFormsItems(nameItem, WIDTH_FIELD, HEIGHT_FIELD, constants.name(), nameValue);

        final TextItem initialEstimationItem = new TextItem("fInitialEstimation");
        configureFormsItems(initialEstimationItem, WIDTH_FIELD, HEIGHT_FIELD, constants.initialEstimation(), initialEstimationValue);

        CheckboxItem assignedItem = new CheckboxItem("fAssigned");
        configureFormsCheckboxItem(assignedItem, WIDTH_FIELD_CHECK, constants.assigned(), assignedValue);
View Full Code Here

        final DynamicForm exampleForm = new DynamicForm();
        exampleForm.setLeft(200);
        exampleForm.setCanDragResize(true);
        exampleForm.setBorder("3px solid #0083ff");
       
        TextItem nameField = new TextItem("Name");
       
        ListGridItem countryField = new ListGridItem("countryName");
        countryField.setGridData(CountryData.getRecords());
        countryField.setGridFields(new ListGridField("countryName"),
                                   new ListGridField("capital"));
       
        TextItem emailField = new TextItem("Email");
       
        exampleForm.setFields(nameField, countryField, emailField);
       
        Map initialValues = new HashMap();
        initialValues.put("Name", "Bob");
View Full Code Here

        //form.setBorder("1px solid blue");
        form.setPadding(5);
        form.setCanDragResize(true);
        form.setResizeFrom("R");
       
        TextItem subjectItem = new TextItem();
        subjectItem.setTitle("Subject");
        subjectItem.setWidth("*");

        TextAreaItem messageItem = new TextAreaItem();
        messageItem.setShowTitle(false);
        messageItem.setLength(5000);
        messageItem.setColSpan(2);
View Full Code Here

        final DynamicForm form = new DynamicForm();
        form.setAutoFocus(true);
        form.setNumCols(3);
        form.setWidth(300);

        TextItem firstName = new TextItem("fName");
        firstName.setTitle("First Name");
        firstName.setSelectOnFocus(true);
        firstName.setWrapTitle(false);
        firstName.setDefaultValue("[First Name]");

        TextItem lastName = new TextItem("lName");
        lastName.setTitle("Last Name");
        lastName.setDefaultValue("[Last Name]");
        lastName.setWrapTitle(false);

        ButtonItem button = new ButtonItem("hello", "Hello");
        button.setStartRow(false);
        button.setWidth(80);
        button.setIcon("icons/16/message.png");
View Full Code Here

    public Canvas getViewPanel() {
        DynamicForm form = new DynamicForm();
        form.setWidth(400);

        TextItem firstName = new TextItem("firstName", "First name");
        firstName.setMask(">?<??????????????");
        firstName.setHint("<nobr>&gt;?&lt;??????????????<nobr>");

        TextItem lastName = new TextItem("lastName", "Last name");
        lastName.setMask(">?<??????????????");
        lastName.setHint("<nobr>&gt;?&lt;??????????????<nobr>");

        TextItem stateField = new TextItem("state", "State");
        stateField.setMask(">LL");
        stateField.setHint("<nobr>&gt;LL</nobr>");

        TextItem phoneNumberField = new TextItem("phoneNo", "Phone No.");
        phoneNumberField.setMask("(###) ###-####");
        phoneNumberField.setHint("<nobr>(###)&nbsp;###-####</nobr>");

        DateItem dateField = new DateItem("dateItem", "Date");
        dateField.setUseTextField(true);
        dateField.setUseMask(true);
View Full Code Here

            public void onFormItemClick(FormItemIconClickEvent event) {
                SC.say("Refresh Picker clicked");
            }
        });

        TextItem pickerControls = new TextItem("pickerControls", "Picker Controls");
        pickerControls.setIcons(clearPicker, searchPicker, refreshPicker);

        TextItem datePickerControl = new TextItem("datePicker", "Date Picker");
        datePickerControl.setIcons(datePicker);

        TextItem refreshOnlyControl = new TextItem("refreshPicker", "Refresh Picker");
        refreshOnlyControl.setIcons(refreshPicker);

        form.setFields(pickerControls, datePickerControl, refreshOnlyControl);

        return form;
    }
View Full Code Here

    public Canvas getViewPanel() {

        final DynamicForm form = new DynamicForm();
        form.setWidth(300);

        TextItem caseNumber = new TextItem("case", "Case #");
        caseNumber.setWidth(130);
        caseNumber.setHint("Enter case number");
        caseNumber.setShowHintInField(true);

        FormItemIcon icon = new FormItemIcon();
        icon.setSrc("[SKIN]/actions/help.png");

        final StaticTextItem severityLevel = new StaticTextItem();
        severityLevel.setName("severityLevel");
        severityLevel.setTitle("Severity Level");
        severityLevel.setDefaultValue("Severity 2");
        severityLevel.setIcons(icon);
        severityLevel.addIconClickHandler(new IconClickHandler() {
      public void onIconClick(IconClickEvent event) {
        SC.say(HELPTEXT);
      }
        });

        final TextItem dueDate = new TextItem("dueDate", "Due Date");
        dueDate.setWidth(70);
        dueDate.setHint("MM/YYYY");
       
        form.setFields(caseNumber, severityLevel, dueDate);

        return form;
    }
View Full Code Here

        }
    }

    public Canvas getViewPanel() {
        DynamicForm form = new DynamicForm();
        TextItem nameField = new TextItem("name", "Name");
        nameField.setWidth(200);
        nameField.setHint("Mapped to uppercase");
        nameField.setCharacterCasing(CharacterCasing.UPPER);

        TextItem commisionField = new TextItem("commission", "Commission");
        commisionField.setWidth(100);
        commisionField.setHint("Numeric&nbsp;only<br>[0-9.]");       
        commisionField.setKeyPressFilter("[0-9.]");

        form.setFields(nameField, commisionField);
       
        return form;
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.fields.TextItem

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.