Java Code Examples for com.vaadin.ui.TextArea#setNullRepresentation()

The following examples show how to use com.vaadin.ui.TextArea#setNullRepresentation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PDPStatusWindow.java    From XACML with MIT License 5 votes vote down vote up
protected TextArea	createTextArea(String value, int lines) {
	TextArea area = new TextArea();
	area.setValue(value);
	area.setNullRepresentation("");
	area.setSizeFull();
	area.setReadOnly(true);
	area.setRows(lines);
	return area;
}
 
Example 2
Source File: FormUtils.java    From jdal with Apache License 2.0 5 votes vote down vote up
/** 
 * Create a new TextArea with current locale from {@link LocaleContextHolder}
 * @return a new TextArea
 */
public static TextArea newTextArea() {
	TextArea area = new TextArea();
	area.setNullRepresentation("");
	area.setLocale(LocaleContextHolder.getLocale());
	
	return area;
}
 
Example 3
Source File: RuleEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelRuleID
	labelRuleID = new Label();
	labelRuleID.setCaption("Rule ID");
	labelRuleID.setImmediate(false);
	labelRuleID.setWidth("100.0%");
	labelRuleID.setHeight("-1px");
	labelRuleID.setValue("Label");
	mainLayout.addComponent(labelRuleID);
	mainLayout.setExpandRatio(labelRuleID, 1.0f);
	
	// optionGroupEffect
	optionGroupEffect = new OptionGroup();
	optionGroupEffect.setCaption("Choose the effect.");
	optionGroupEffect.setImmediate(false);
	optionGroupEffect.setWidth("-1px");
	optionGroupEffect.setHeight("-1px");
	optionGroupEffect.setInvalidAllowed(false);
	optionGroupEffect.setRequired(true);
	mainLayout.addComponent(optionGroupEffect);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter a description for the Rule.");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription.setNullSettingAllowed(true);
	textAreaDescription.setNullRepresentation("");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}