本文整理了Java中com.vaadin.ui.TextArea.<init>()
方法的一些代码示例,展示了TextArea.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.<init>()
方法的具体详情如下:
包路径:com.vaadin.ui.TextArea
类名称:TextArea
方法名:<init>
[英]Constructs an empty TextArea.
[中]构造一个空文本区域。
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
@Override
public Component createEditor() {
TextArea ret = new TextArea();
ret.setHeight("100px");
return ret;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
protected TextArea createTextComponent() {
final TextArea textArea = new TextArea();
textArea.addStyleName(ValoTheme.TEXTAREA_SMALL);
return textArea;
}
代码示例来源:origin: eclipse/hawkbit
@Override
protected TextArea createTextComponent() {
final TextArea textArea = new TextArea();
textArea.addStyleName(ValoTheme.TEXTAREA_SMALL);
return textArea;
}
代码示例来源:origin: org.activiti/activiti-explorer
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);
}
代码示例来源:origin: org.activiti/activiti-explorer
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);
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6
protected AbstractField createTextField() throws MException {
TextArea out = new TextArea();
out.setHeight(getElement().getConfig().getInt("height", 200),Sizeable.UNITS_PIXELS);
return out;
}
代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor
ValueWindow(String value) {
super("Value"); // Set window caption
center();
TextArea textArea = new TextArea("", value);
textArea.setWidth(400, Unit.PIXELS);
textArea.setRows(10);
setContent(textArea);
}
}
代码示例来源:origin: KrailOrg/krail
@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);
}
代码示例来源:origin: com.holon-platform.vaadin7/documentation-vaadin
@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[]
}
代码示例来源:origin: apache/ace
/**
* 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;
}
代码示例来源:origin: uk.q3c.krail/krail
@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);
}
代码示例来源:origin: KrailOrg/krail
@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);
}
代码示例来源:origin: uk.q3c.krail/krail
@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);
}
代码示例来源:origin: org.apache.ace/org.apache.ace.server.log.ui
/**
* 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;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@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;
}
}
代码示例来源:origin: eclipse/hawkbit
@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;
}
}
代码示例来源:origin: org.aperteworkflow/base-widgets
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);
}
代码示例来源:origin: uk.q3c.krail/krail
/**
* {@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);
}
代码示例来源:origin: KrailOrg/krail
/**
* {@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);
}
代码示例来源:origin: org.activiti/activiti-explorer
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);
}
内容来源于网络,如有侵权,请联系作者删除!