@Override public void setWidth(String width) { TextArea.this.setWidth(width); } });
@Override public void setColumns(int columns) { this.columns = columns; // See com.vaadin.v7.client.ui.VTextField.setColumns for formula component.setWidth(columns + "em"); }
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); }
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); }
ValueWindow(String value) { super("Value"); // Set window caption center(); TextArea textArea = new TextArea("", value); textArea.setWidth(400, Unit.PIXELS); textArea.setRows(10); setContent(textArea); } }
private TextArea getDescriptionTextArea() { final TextArea description = new TextAreaBuilder(Target.DESCRIPTION_MAX_SIZE) .caption(i18n.getMessage("textfield.description")).style("text-area-style") .id(UIComponentIdProvider.BULK_UPLOAD_DESC).buildTextComponent(); description.setWidth("100%"); return description; }
/** * Creates a {@link TextArea} with a dump of the given event's properties. * * @param event * the event to create a textarea for, cannot be <code>null</code>. * @return a {@link TextArea} instance, never <code>null</code>. */ final TextArea getProperties(Event event) { Map<String, String> props = event.getProperties(); TextArea area = new TextArea("", dumpProperties(props)); area.setWidth(FILL_AREA); area.setRows(props.size()); area.setWordwrap(false); area.setReadOnly(true); area.setImmediate(true); return area; }
private TextArea getDescriptionTextArea() { final TextArea description = new TextAreaBuilder(Target.DESCRIPTION_MAX_SIZE) .caption(i18n.getMessage("textfield.description")).style("text-area-style") .id(UIComponentIdProvider.BULK_UPLOAD_DESC).buildTextComponent(); description.setWidth("100%"); return description; }
/** * Creates a {@link TextArea} with a dump of the given event's properties. * * @param event the event to create a textarea for, cannot be <code>null</code>. * @return a {@link TextArea} instance, never <code>null</code>. */ private TextArea getProperties(LogEvent event) { Dictionary props = event.getProperties(); TextArea area = new TextArea("", dumpProperties(props)); area.setWidth(FILL_AREA); area.setRows(props.size()); area.setWordwrap(false); area.setReadOnly(true); area.setImmediate(true); return area; }
public void load(Audit audit) { panel.removeAllComponents(); getMaduraSessionManager().getValidationSession().bind(audit); BeanItem<Audit> beanItem = new BeanItem<Audit>(audit); m_fieldGroup = m_maduraSessionManager.createMaduraFieldGroup(); Map<String,Field<?>> fields = m_fieldGroup.buildAndBind(new String[]{"created","lockedBy","status","comment"},beanItem); // String[] fieldList = new String[]{"created","lockedBy","status","comment"}; // m_fieldGroup.setFieldList(fieldList); // m_auditForm.setItemDataSource(beanItem); TextArea comment = (TextArea)fields.get("comment"); comment.setWidth("700px"); for (Field<?> f: fields.values()) { panel.addComponent(f); } panel.addComponent(getInitialLayout()); // panel.requestRepaint(); if (getParent() == null) { UI.getCurrent().addWindow(this); this.center(); } } @PostConstruct
public AbstractField<?> getTextField(MaduraPropertyWrapper property) { AbstractTextField ret = null; if (property.isSecret()) { ret = new PasswordField(); } else { if ("comment".equals(property.getName())) { TextArea textArea = new TextArea(); textArea.setRows(5); textArea.setWordwrap(true); textArea.setWidth("400px"); ret = textArea; } else { ret = new TextField(); } } ret.setMaxLength(property.getMaxLength()); if (property.getValue() == null) { property.setValue(""); } return ret; } }
@Override public Component getDetails(final RowReference rowReference) { // Find the bean to generate details for final Item item = rowReference.getItem(); final String message = (String) item.getItemProperty(ProxyMessage.PXY_MSG_VALUE).getValue(); final TextArea textArea = new TextArea(); textArea.addStyleName(ValoTheme.TEXTAREA_BORDERLESS); textArea.addStyleName(ValoTheme.TEXTAREA_TINY); textArea.addStyleName("inline-icon"); textArea.setHeight(120, Unit.PIXELS); textArea.setWidth(100, Unit.PERCENTAGE); textArea.setValue(message); textArea.setReadOnly(Boolean.TRUE); return textArea; } }
@Override public Component getDetails(final RowReference rowReference) { // Find the bean to generate details for final Item item = rowReference.getItem(); final String message = (String) item.getItemProperty(ProxyMessage.PXY_MSG_VALUE).getValue(); final TextArea textArea = new TextArea(); textArea.addStyleName(ValoTheme.TEXTAREA_BORDERLESS); textArea.addStyleName(ValoTheme.TEXTAREA_TINY); textArea.addStyleName("inline-icon"); textArea.setHeight(120, Unit.PIXELS); textArea.setWidth(100, Unit.PERCENTAGE); textArea.setValue(message); textArea.setReadOnly(Boolean.TRUE); return textArea; } }
descriptionTextArea.setWidth(100, UNITS_PERCENTAGE); descriptionTextArea.setValue(task.getDescription()); editLayout.addComponent(descriptionTextArea);
valueField.setWidth("95%");
public ScriptCodeEditor() { VerticalLayout compositionRoot = new VerticalLayout(); setCompositionRoot(compositionRoot); code = new TextArea(); code.setWidth("100%"); code.setNullRepresentation(""); compositionRoot.addComponent(code); HorizontalLayout hl = new HorizontalLayout(); Button save = new Button(getLocalizedMessage("script.editor.save")); save.addListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { validateAndSave(); } }); hl.addComponent(save); compositionRoot.addComponent(hl); }
public ProcessDataWidgetsDefinitionEditor() { hierarchyEditor = new ProcessDataHierarchyEditor(this); rawText.setNullRepresentation(""); rawText.setWidth("100%"); rawText.setHeight("400px"); TabSheet tabSheet = new TabSheet(); tabSheet.setWidth("100%"); tabSheet.addTab(hierarchyEditor, getLocalizedMessage("hierarchy-editor")); tabSheet.addTab(getRawTextEditorTab(), getLocalizedMessage("source-xml")); tabSheet.addTab(processPreview, getLocalizedMessage("preview")); tabSheet.setSelectedTab(hierarchyEditor); setCompositionRoot(tabSheet); }
descriptionTextArea.setWidth(100, UNITS_PERCENTAGE); descriptionTextArea.setValue(task.getDescription()); editLayout.addComponent(descriptionTextArea);
protected void addFields() { form = new Form(); form.setCaption(i18nManager.getMessage(Messages.PROCESS_COPY_POPUP_CAPTION)); form.getLayout().setMargin(true); nameTextField = new TextField(i18nManager.getMessage(Messages.TASK_NAME)); nameTextField.setWidth(20, Sizeable.UNITS_EM); nameTextField.setRequired(true); nameTextField.setValue(modelData.getName()); form.getLayout().addComponent(nameTextField); nameTextField.focus(); descriptionTextArea = new TextArea(i18nManager.getMessage(Messages.TASK_DESCRIPTION)); descriptionTextArea.setRows(8); descriptionTextArea.setWidth(20, Sizeable.UNITS_EM); form.getLayout().addComponent(descriptionTextArea); addComponent(form); // Some empty space Label emptySpace = new Label(" ", Label.CONTENT_XHTML); addComponent(emptySpace); }
protected void addFields() { formLayout = new GridLayout(2, 3); formLayout.setSpacing(true); formLayout.addComponent(new Label(i18nManager.getMessage(Messages.TASK_NAME))); nameTextField = new TextField(); nameTextField.setWidth(25, Sizeable.UNITS_EM); nameTextField.focus(); formLayout.addComponent(nameTextField); formLayout.addComponent(new Label(i18nManager.getMessage(Messages.TASK_DESCRIPTION))); descriptionTextArea = new TextArea(); descriptionTextArea.setRows(8); descriptionTextArea.setWidth(25, Sizeable.UNITS_EM); descriptionTextArea.addStyleName(ExplorerLayout.STYLE_TEXTAREA_NO_RESIZE); formLayout.addComponent(descriptionTextArea); Label editorLabel = new Label(i18nManager.getMessage(Messages.PROCESS_EDITOR_CHOICE)); formLayout.addComponent(editorLabel); formLayout.setComponentAlignment(editorLabel, Alignment.MIDDLE_LEFT); selectEditorComponent = new SelectEditorComponent(); formLayout.addComponent(selectEditorComponent); addComponent(formLayout); // Some empty space Label emptySpace = new Label(" ", Label.CONTENT_XHTML); addComponent(emptySpace); }