/** * 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 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; }
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; } }
/** * Helper method to initialise this object. * * @param message */ protected void init(String text) { super.setWidth("50%"); super.setHeight("50%"); super.setModal(true); super.setResizable(true); super.center(); TextArea ta = new TextArea(); ta.setSizeFull(); ta.setValue(text); ta.setWordwrap(false); HorizontalLayout layout = new HorizontalLayout(); layout.setMargin(true); layout.addComponent(ta); layout.setSizeFull(); Panel p = new Panel(); p.setSizeFull(); p.setContent(layout); super.setContent(p); } }
comment.setWordwrap(true); comment.setWidth("700px"); TextArea taskField = new TextArea(); taskField.setRows(2); taskField.setWordwrap(true); taskField.setWidth("700px"); taskField.setValue(task);
synchronisedTextArea.setWordwrap(true);