@Override public Component createEditor() { TextArea ret = new TextArea(); ret.setHeight("100px"); return ret; }
@Override protected TextArea createTextComponent() { final TextArea textArea = new TextArea(); textArea.addStyleName(ValoTheme.TEXTAREA_SMALL); return textArea; }
@Override protected TextArea createTextComponent() { final TextArea textArea = new TextArea(); textArea.addStyleName(ValoTheme.TEXTAREA_SMALL); return textArea; }
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); }
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 AbstractField createTextField() throws MException { TextArea out = new TextArea(); out.setHeight(getElement().getConfig().getInt("height", 200),Sizeable.UNITS_PIXELS); return out; }
ValueWindow(String value) { super("Value"); // Set window caption center(); TextArea textArea = new TextArea("", value); textArea.setWidth(400, Unit.PIXELS); textArea.setRows(10); setContent(textArea); } }
@Override public void doBuild() { textArea = new TextArea(); textArea.setSizeFull(); textArea.setReadOnly(false); textArea.setWordWrap(false); if (error != null) { String s = ExceptionUtils.getStackTrace(error) + ("\n\n"); //add a couple of blank lines at the bottom to ensure visibility of the last line textArea.setValue(s); } else { textArea.setValue("Error view has been called but no error has been set. This should not happen"); textArea.setReadOnly(true); } setRootComponent(textArea); }
@SuppressWarnings("unchecked") public void renderers2() { // tag::renderers2[] final PathProperty<String> TEXT = PathProperty.create("text", String.class); InputPropertyRenderer<String> textAreaInputRenderer = p -> Components.input.string(true).build(); // <1> PropertyRendererRegistry.get().register(p -> p == TEXT, textAreaInputRenderer); // <2> Input<String> input = TEXT.render(Input.class); // <3> InputFieldPropertyRenderer<String> fieldRenderer = p -> new TextArea(); // <4> // end::renderers2[] }
/** * 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; }
@Override protected void doBuild(ViewChangeBusMessage busMessage) { super.doBuild(busMessage); reportArea = new TextArea(); // reportArea.setEnabled(false); reportArea.setSizeFull(); reportArea.setValue(masterSitemap.getReport()); setCentreCell(reportArea); setColumnWidths(1f, 4f, 1f); setRowHeights(1f, 10f, 1f); }
@Override protected void doBuild() { super.doBuild(); reportArea = new TextArea(); // reportArea.setEnabled(false); reportArea.setSizeFull(); reportArea.setValue(masterSitemap.getReport()); setCentreCell(reportArea); setColumnWidths(1f, 4f, 1f); setRowHeights(1f, 10f, 1f); }
@Override public void doBuild(ViewChangeBusMessage busMessage) { textArea = new TextArea(); textArea.setSizeFull(); textArea.setReadOnly(false); textArea.setWordwrap(false); if (error != null) { String s = ExceptionUtils.getStackTrace(error) + ("\n\n"); //add a couple of blank lines at the bottom to ensure visibility of the last line textArea.setValue(s); } else { textArea.setValue("Error view has been called but no error has been set. This should not happen"); textArea.setReadOnly(true); } setRootComponent(textArea); }
/** * 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; }
@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; } }
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); }
/** * {@inheritDoc} */ @Override protected void doBuild(ViewChangeBusMessage busMessage) { super.doBuild(busMessage); instructions1 = new Label(); instructions2 = new Label(); localeList = new TextArea(); exportButton = new Button(); exportButton.addClickListener(event -> export()); exportStatus = new Label(); VerticalLayout layout1 = new VerticalLayout(exportButton, exportStatus); setTopLeft(new VerticalLayout(instructions1, instructions2, localeList)); setMiddleLeft(layout1); localeChanged(null); }
/** * {@inheritDoc} */ @Override protected void doBuild() { super.doBuild(); instructions1 = new Label(); instructions2 = new Label(); localeList = new TextArea(); exportButton = new Button(); exportButton.addClickListener(event -> export()); exportStatus = new Label(); VerticalLayout layout1 = new VerticalLayout(exportButton, exportStatus); setTopLeft(new VerticalLayout(instructions1, instructions2, localeList)); setMiddleLeft(layout1); localeChanged(null); }
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); }