Search in sources :

Example 1 with TextField

use of com.vaadin.ui.TextField in project Activiti by Activiti.

the class NewCasePopupWindow method initForm.

protected void initForm() {
    form = new Form();
    form.setValidationVisibleOnCommit(true);
    form.setImmediate(true);
    addComponent(form);
    // name
    nameField = new TextField(i18nManager.getMessage(Messages.TASK_NAME));
    nameField.focus();
    nameField.setRequired(true);
    nameField.setRequiredError(i18nManager.getMessage(Messages.TASK_NAME_REQUIRED));
    form.addField("name", nameField);
    // description
    descriptionArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION));
    descriptionArea.setColumns(25);
    form.addField("description", descriptionArea);
    // duedate
    dueDateField = new DateField(i18nManager.getMessage(Messages.TASK_DUEDATE));
    dueDateField.setResolution(DateField.RESOLUTION_DAY);
    form.addField("duedate", dueDateField);
    // priority
    priorityComboBox = new PriorityComboBox(i18nManager);
    form.addField("priority", priorityComboBox);
}
Also used : Form(com.vaadin.ui.Form) TextArea(com.vaadin.ui.TextArea) TextField(com.vaadin.ui.TextField) DateField(com.vaadin.ui.DateField)

Example 2 with TextField

use of com.vaadin.ui.TextField in project Activiti by Activiti.

the class SubTaskComponent method initAddButton.

protected void initAddButton() {
    addSubTaskButton = new Button();
    addSubTaskButton.addStyleName(ExplorerLayout.STYLE_ADD);
    addSubTaskPanel.addComponent(addSubTaskButton);
    addSubTaskButton.addListener(new ClickListener() {

        public void buttonClick(ClickEvent event) {
            // Remove button
            addSubTaskPanel.removeAllComponents();
            // And add textfield
            Label createSubTaskLabel = new Label("Create new subtask:");
            createSubTaskLabel.addStyleName(Reindeer.LABEL_SMALL);
            addSubTaskPanel.addComponent(createSubTaskLabel);
            newTaskTextField = new TextField();
            newTaskTextField.focus();
            addSubTaskPanel.addComponent(newTaskTextField);
        }
    });
}
Also used : Button(com.vaadin.ui.Button) ClickEvent(com.vaadin.ui.Button.ClickEvent) Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField) ClickListener(com.vaadin.ui.Button.ClickListener) DeleteSubTaskClickListener(org.activiti.explorer.ui.task.listener.DeleteSubTaskClickListener)

Example 3 with TextField

use of com.vaadin.ui.TextField in project Activiti by Activiti.

the class SimpleTableEditor method initNameField.

protected void initNameField(GridLayout layout) {
    nameField = new TextField();
    nameField.setWriteThrough(true);
    nameField.setImmediate(true);
    layout.addComponent(new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_NAME)));
    layout.addComponent(nameField);
    if (workflowName != null) {
        nameField.setValue(workflowName);
        workflowName = null;
    }
}
Also used : Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField)

Example 4 with TextField

use of com.vaadin.ui.TextField in project Activiti by Activiti.

the class SimpleTableEditor method initDescriptionField.

protected void initDescriptionField(GridLayout layout) {
    descriptionField = new TextField();
    descriptionField.setRows(4);
    descriptionField.setColumns(35);
    descriptionField.addStyleName(ExplorerLayout.STYLE_TEXTAREA_NO_RESIZE);
    layout.addComponent(new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_DESCRIPTION)));
    layout.addComponent(descriptionField);
    if (description != null) {
        descriptionField.setValue(description);
        description = null;
    }
}
Also used : Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField)

Example 5 with TextField

use of com.vaadin.ui.TextField in project Activiti by Activiti.

the class SaveReportPopupWindow method createNameTextField.

protected void createNameTextField(I18nManager i18nManager, VerticalLayout layout) {
    HorizontalLayout fieldLayout = new HorizontalLayout();
    fieldLayout.setWidth(100, UNITS_PERCENTAGE);
    layout.addComponent(fieldLayout);
    fieldLayout.addComponent(new Label(i18nManager.getMessage(Messages.REPORTING_SAVE_POPUP_NAME)));
    nameField = new TextField();
    nameField.setWidth(250, UNITS_PIXELS);
    nameField.focus();
    fieldLayout.addComponent(nameField);
}
Also used : Label(com.vaadin.ui.Label) TextField(com.vaadin.ui.TextField) HorizontalLayout(com.vaadin.ui.HorizontalLayout)

Aggregations

TextField (com.vaadin.ui.TextField)79 Test (org.junit.Test)22 Button (com.vaadin.ui.Button)15 Label (com.vaadin.ui.Label)15 HorizontalLayout (com.vaadin.ui.HorizontalLayout)12 VerticalLayout (com.vaadin.ui.VerticalLayout)10 ClickListener (com.vaadin.ui.Button.ClickListener)7 ComboBox (com.vaadin.ui.ComboBox)7 GridLayout (com.vaadin.ui.GridLayout)7 SplitTextField (au.com.vaadinutils.crud.splitFields.SplitTextField)6 InvalidValueException (com.vaadin.data.Validator.InvalidValueException)6 ClickEvent (com.vaadin.ui.Button.ClickEvent)6 PasswordField (com.vaadin.ui.PasswordField)6 CheckBox (com.vaadin.ui.CheckBox)4 Form (com.vaadin.ui.Form)4 TextArea (com.vaadin.ui.TextArea)4 Date (java.util.Date)4 HashMap (java.util.HashMap)4 Property (com.vaadin.data.Property)3 Validator (com.vaadin.data.Validator)3