@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); }
@Override public void setRows(int rows) { component.setRows(rows); }
@Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); design.html(DesignFormatter.encodeForTextNode(getValue())); } }
@Override protected TextArea createTextComponent() { final TextArea textArea = new TextArea(); textArea.addStyleName(ValoTheme.TEXTAREA_SMALL); return 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); }
TextArea sourceParamNameValueTextArea = new TextArea(); sourceParamNameValueTextArea.setWidth("80%"); sourceParamNameValueTextArea.setRows(4); sourceParamNameValueTextArea.setValue(sb.toString()); sourceParamNameValueTextArea.setReadOnly(true); TextArea targetParamNameValueTextArea = new TextArea(); targetParamNameValueTextArea.setWidth("80%"); targetParamNameValueTextArea.setRows(4); targetParamNameValueTextArea.setValue(sb.toString()); targetParamNameValueTextArea.setReadOnly(true);
final TextArea resultArea = new TextArea(); resultArea.setRows(15); resultArea.setSizeFull(); cancelButton.addClickListener((event) -> { pingService.cancel(); resultArea.setValue(resultArea.getValue() + "\n" + "Ping cancelled by user"); getUI().setPollInterval(initialPollInterval); setRunning(false); setRunning(true); getUI().setPollInterval(POLL_INTERVAL); resultArea.setValue(""); // Clear pingService.ping(pingRequest, (result) -> { setRunning(!result.isComplete()); resultArea.setValue(result.toDetailString()); if (result.isComplete()) { getUI().setPollInterval(initialPollInterval);
@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; } }
/** * 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; }
mainLayout.setSpacing(true); TextArea textArea = new TextArea(); textArea.setHeight(theme.get("cuba.web.ExceptionDialog.textArea.height")); textArea.setWidth(100, Unit.PERCENTAGE); textArea.setValue(text); } else { textArea.setValue(messages.getMainMessage("exceptionDialog.contactAdmin")); textArea.setReadOnly(true); buttonsLayout.addComponent(logoutButton); stackTraceTextArea = new TextArea(); stackTraceTextArea.setSizeFull(); stackTraceTextArea.setWordWrap(false); stackTraceTextArea.setValue(stackTrace); stackTraceTextArea.setStyleName(cubaLogContentClass); stackTraceTextArea.addStyleName(cubaCopyLogContentClass); stackTraceTextArea.setReadOnly(true); stackTraceTextArea.setCubaId("stackTraceTextArea"); logoutButton.setCubaId("logoutButton");
public void buttonClick(ClickEvent event) final TextArea tf1 = new TextArea(); tf1.addValidator(new NonZeroLengthStringValidator("You must enter a comment!")); tf1.setRows(5); tf1.setReadOnly(false); tf1.setWidth("100%"); tf1.setValidationVisible(false); layout.removeAllComponents();
setHeight("540px"); editor = new TextArea(); editor.setPropertyDataSource(new TextFileProperty(file)); editor.setImmediate(false); editor.setSizeFull(); editor.setRows(30); editor.setReadOnly(readOnly);
this.policyDescription = new TextArea(); this.policyDescription.addValidator(new StringLengthValidator( "A description must be entered.", 1, null, false)); this.policyDescription.setRows(4); this.policyDescription.setWidth("80%"); this.policyDescription.setValidationVisible(false); this.policyDescription.setPropertyDataSource(policyItem.getItemProperty("description")); linkedEntityLabel.setSizeUndefined(); this.linkedEntity = new TextArea(); this.linkedEntity.addValidator(new StringLengthValidator( "If a Policy Link Type is selected, you must link to an approptiate entity.", 1, null, false)); this.linkedEntity.setWidth("80%"); this.linkedEntity.setValidationVisible(false); this.linkedEntity.setHeight("60px"); gridLayout.addComponent(linkedEntity, 1, 6); linkedEntityLabel.setVisible(false); linkedEntity.setVisible(false);
@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); }
TextArea legendLabel = new TextArea(); legendLabel.setValue("Legend:"); legendLabel.setReadOnly(true); legendLabel.addStyleName("borderless"); legendLabel.addStyleName("legend"); legendLabel.addStyleName("legend-label"); TextArea tfStruct = new TextArea(); tfStruct.setValue("structure" + "\n" + "node"); tfStruct.setReadOnly(true); tfStruct.addStyleName("legend"); tfStruct.addStyleName("legend-struct"); TextArea tfSpan = new TextArea(); tfSpan.setValue("spanning" + "\n" +"node"); tfSpan.setReadOnly(true); tfSpan.addStyleName("legend"); tfSpan.addStyleName("legend-span"); TextArea tfToken = new TextArea(); tfToken.setValue("token"); tfToken.setReadOnly(true); tfToken.addStyleName("legend"); tfToken.addStyleName("legend-token");
TextArea ta = new TextArea(); if (taw.getVisibleLines() != null) { ta.setRows(taw.getVisibleLines()); ta.setMaxLength(taw.getLimit()); ta.setRequired(true); if (hasText(taw.getCaption())) { ta.setRequiredError(getMessage("processdata.block.field-required-error") + " " + taw.getCaption()); } else { ta.setRequiredError(getMessage("processdata.block.field-required-error")); ta.setValue(taw.getValue());
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; } }