List of usage examples for com.vaadin.ui TextArea TextArea
public TextArea(ValueChangeListener<String> valueChangeListener)
From source file:com.klwork.explorer.ui.content.file.FileAttachmentEditorComponent.java
License:Apache License
protected void initDescription() { TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION)); descriptionField.setWidth(100, UNITS_PERCENTAGE); descriptionField.setHeight(50, UNITS_PIXELS); form.addField("description", descriptionField); }
From source file:com.klwork.explorer.ui.content.url.UrlAttachmentEditorComponent.java
License:Apache License
protected void initDescription() { TextArea descriptionField = new TextArea(i18nManager.getMessage(Messages.RELATED_CONTENT_DESCRIPTION)); descriptionField.setWidth(100, UNITS_PERCENTAGE); descriptionField.setHeight(100, UNITS_PIXELS); addField("description", descriptionField); }
From source file:com.klwork.explorer.ui.task.NewTaskPopupWindow.java
License:Apache License
protected void initForm() { form = new Form(); form.setValidationVisibleOnCommit(true); form.setImmediate(true);/*from w ww . ja va 2 s. c o m*/ setContent(form); // 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); }
From source file:com.klwork.explorer.ui.task.NewTodoToTaskPopupWindow.java
License:Apache License
@Override protected void initFormSubComponent() { // name/*from w w w . ja va 2 s . c om*/ nameField = new TextField(i18nManager.getMessage(Messages.TASK_NAME)); nameField.setValue(relTodo.getName()); nameField.focus(); nameField.setRequired(true); nameField.setRequiredError(i18nManager.getMessage(Messages.TASK_NAME_REQUIRED)); getForm().addComponent(nameField); // description descriptionArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION)); if (StringTool.judgeBlank(relTodo.getDescription())) { descriptionArea.setValue(relTodo.getDescription()); } descriptionArea.setColumns(25); // form.addField("description", descriptionArea); getForm().addComponent(descriptionArea); // duedate dueDateField = CommonFieldHandler.createDateField(i18nManager.getMessage(Messages.TASK_DUEDATE), false); if (StringTool.judgeBlank(relTodo.getCompletionDate())) { dueDateField.setValue(relTodo.getCompletionDate()); } // form.addField("duedate", dueDateField); getForm().addComponent(dueDateField); // priority priorityComboBox = new PriorityComboBox(i18nManager); // form.addField("priority", priorityComboBox); getForm().addComponent(priorityComboBox); // String defaultTeam = null; if (StringTool.judgeBlank(relTodo.getAssignedTeam())) { defaultTeam = relTodo.getAssignedTeam(); } userGroupComboBox = help.getUserOfTeamComboBox("", defaultTeam); //userGroupComboBox. userGroupComboBox.addValueChangeListener(new com.vaadin.data.Property.ValueChangeListener() { /** * */ private static final long serialVersionUID = -3864934875844211279L; @Override public void valueChange(ValueChangeEvent event) { Object o = event.getProperty().getValue(); changeUserSelect(o.toString()); } }); getForm().addComponent(userGroupComboBox); String defaultUser = null; // if (StringTool.judgeBlank(relTodo.getAssignedUser())) { defaultUser = relTodo.getAssignedUser(); } Map<String, String> usersMap = new HashMap(); usersMap.put("", i18nManager.getMessage(Messages.SELECT_DEFAULT)); userComboBox = CommonFieldHandler.createComBox(i18nManager.getMessage(Messages.TEAM_MEMBER_SELECT), usersMap, defaultUser); getForm().addComponent(userComboBox); initCreateTaskButton(); initEnterKeyListener(); }
From source file:com.lst.deploymentautomation.vaadin.popup.TodoEscalation.java
License:Open Source License
@Override public void attach() { super.attach(); LspsUI ui = (LspsUI) getUI();//from w ww . j a v a2s .co m setCaption(ui.getMessage("todo.escalationTitle")); VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSpacing(true); layout.setSizeFull(); setContent(layout); Label help = new Label(ui.getMessage("todo.escalationHelp")); help.setStyleName("form-help"); layout.addComponent(help); reason = new TextArea(ui.getMessage("todo.escalationReason")); reason.setMaxLength(1024); reason.setRequired(true); reason.setSizeFull(); layout.addComponent(reason); layout.setExpandRatio(reason, 1); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); layout.addComponent(buttons); @SuppressWarnings("serial") Button submitButton = new Button(ui.getMessage("action.escalate"), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { escalate(); } }); buttons.addComponent(submitButton); @SuppressWarnings("serial") Button cancelButton = new Button(ui.getMessage("action.cancel"), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { close(); } }); buttons.addComponent(cancelButton); }
From source file:com.lst.deploymentautomation.vaadin.popup.TodoRejection.java
License:Open Source License
@Override public void attach() { super.attach(); LspsUI ui = (LspsUI) getUI();// w w w . jav a 2 s .c om setCaption(ui.getMessage("todo.rejectionTitle")); VerticalLayout layout = new VerticalLayout(); layout.setMargin(true); layout.setSpacing(true); layout.setSizeFull(); setContent(layout); Label help = new Label(ui.getMessage("todo.rejectionHelp")); help.setStyleName("form-help"); layout.addComponent(help); reason = new TextArea(ui.getMessage("todo.rejectionReason")); reason.setMaxLength(1024); reason.setRequired(true); reason.setSizeFull(); layout.addComponent(reason); layout.setExpandRatio(reason, 1); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); layout.addComponent(buttons); @SuppressWarnings("serial") Button rejectButton = new Button(ui.getMessage("action.reject"), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { reject(); } }); buttons.addComponent(rejectButton); @SuppressWarnings("serial") Button cancelButton = new Button(ui.getMessage("action.cancel"), new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { close(); } }); buttons.addComponent(cancelButton); }
From source file:com.openhris.calendar.CalendarScheduleWindow.java
VerticalLayout scheduleLayout() { VerticalLayout layout = new VerticalLayout(); layout.setMargin(true);//from ww w . ja v a 2s. c o m layout.setSpacing(true); eventType = createEventTypelect(); layout.addComponent(eventType); startDate = createDateField("Start Date: "); layout.addComponent(startDate); endDate = createDateField("End Date: "); layout.addComponent(endDate); caption = createTextField("Caption: "); layout.addComponent(caption); location = createTextField("Where: "); layout.addComponent(location); description = new TextArea("Description: "); description.setWidth("100%"); description.setRows(3); layout.addComponent(description); color = createStyleNameSelect(); layout.addComponent(color); saveEventButton = new Button("SAVE", saveEventBtnListener); saveEventButton.setWidth("100%"); deleteEventButton = new Button("DELETE", deleteEventBtnListener); deleteEventButton.setWidth("100%"); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); buttons.setWidth("100%"); buttons.addComponent(deleteEventButton); buttons.addComponent(saveEventButton); // buttons.addComponent(editEventButton); layout.addComponent(buttons); layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT); return layout; }
From source file:com.openhris.calendar.CalendarScheduleWindow.java
VerticalLayout populateSchedule(CalendarComponentEvents.EventClick event) { VerticalLayout layout = new VerticalLayout(); layout.setMargin(true);//from w w w . j ava 2 s. c om layout.setSpacing(true); eventType = createEventTypelect(); eventType.setValue(basicEvent.getEventType()); layout.addComponent(eventType); startDate = createDateField("Start Date: "); startDate.setValue(event.getCalendarEvent().getStart()); layout.addComponent(startDate); endDate = createDateField("End Date: "); endDate.setValue(event.getCalendarEvent().getEnd()); layout.addComponent(endDate); caption = createTextField("Caption: "); caption.setValue(event.getCalendarEvent().getCaption()); layout.addComponent(caption); location = createTextField("Where: "); location.setValue(getBasicEvent().getLocation()); layout.addComponent(location); description = new TextArea("Description: "); description.setWidth("100%"); description.setRows(3); description.setValue(event.getCalendarEvent().getDescription()); layout.addComponent(description); color = createStyleNameSelect(); color.setValue(basicEvent.getStyleName()); layout.addComponent(color); eventDataId = createTextField("id: "); eventDataId.setValue(getBasicEvent().getEventId()); eventDataId.setVisible(false); layout.addComponent(eventDataId); editEventButton = new Button("EDIT", editEventBtnListener); editEventButton.setWidth("100%"); deleteEventButton = new Button("DELETE", deleteEventBtnListener); deleteEventButton.setWidth("100%"); HorizontalLayout buttons = new HorizontalLayout(); buttons.setSpacing(true); buttons.setWidth("100%"); buttons.addComponent(deleteEventButton); buttons.addComponent(editEventButton); layout.addComponent(buttons); layout.setComponentAlignment(buttons, Alignment.BOTTOM_RIGHT); return layout; }
From source file:com.openhris.employee.allowance.EmployeeAllowanceInformation.java
Window remarks(final String buttonCaption) { VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true);//from ww w .j a v a2 s . co m v.setSpacing(true); remarksSubWindow = new Window("REMARKS", v); remarksSubWindow.setWidth("400px"); remarksSubWindow.setModal(true); remarksSubWindow.center(); remarks = new TextArea("Add Remarks: "); remarks.setWidth("100%"); remarks.setRows(3); remarksSubWindow.addComponent(remarks); Button b = new Button(buttonCaption); b.setWidth("100%"); b.addListener(updateClickListener); remarksSubWindow.addComponent(b); return remarksSubWindow; }
From source file:com.openhris.employee.EmployeePersonalInformation.java
private Window updatePersonalInformationConfirmation(final PersonalInformation pi) { VerticalLayout vlayout = new VerticalLayout(); vlayout.setSpacing(true);//from ww w.j av a 2s .c om vlayout.setMargin(true); final Window window = new Window("UPDATE WINDOW", vlayout); window.setWidth("350px"); final TextArea remarks = new TextArea("Remarks"); remarks.setWidth("100%"); remarks.setRows(3); window.addComponent(remarks); Button removeBtn = new Button("UPDATE EMPLOYEE?"); removeBtn.setWidth("100%"); removeBtn.addListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { if (remarks.getValue() == null || remarks.getValue().toString().trim().isEmpty()) { getWindow().showNotification("Add remarks!", Window.Notification.TYPE_ERROR_MESSAGE); return; } boolean result = piService.updatePersonalInformation(pi, remarks.getValue().toString().trim()); if (result) { getWindow().showNotification("Information Updated", Window.Notification.TYPE_TRAY_NOTIFICATION); (window.getParent()).removeWindow(window); } else { getWindow().showNotification("SQL Error", Window.Notification.TYPE_ERROR_MESSAGE); } } }); window.addComponent(removeBtn); return window; }