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

The following examples show how to use com.vaadin.ui.TextArea#setInputPrompt() . 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: GitPushWindow.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");
	
	// textAreaComments
	textAreaComments = new TextArea();
	textAreaComments.setCaption("Add Comments");
	textAreaComments.setImmediate(false);
	textAreaComments
			.setDescription("Enter comments that reflect the changes you have made to the repository domains and/or policy files.");
	textAreaComments.setWidth("400px");
	textAreaComments.setHeight("-1px");
	textAreaComments.setInvalidAllowed(false);
	textAreaComments.setRequired(true);
	textAreaComments
			.setInputPrompt("Eg. Add new rule for employees in marketing department.");
	mainLayout.addComponent(textAreaComments);
	
	// tableChanges
	tableChanges = new Table();
	tableChanges.setCaption("Changes To Be Pushed");
	tableChanges.setImmediate(false);
	tableChanges.setWidth("100.0%");
	tableChanges.setHeight("-1px");
	mainLayout.addComponent(tableChanges);
	mainLayout.setExpandRatio(tableChanges, 1.0f);
	
	// buttonPush
	buttonPush = new Button();
	buttonPush.setCaption("Push Changes");
	buttonPush.setImmediate(true);
	buttonPush.setWidth("-1px");
	buttonPush.setHeight("-1px");
	mainLayout.addComponent(buttonPush);
	mainLayout.setComponentAlignment(buttonPush, new Alignment(48));
	
	return mainLayout;
}
 
Example 2
Source File: PolicyNameEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private FormLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new FormLayout();
	mainLayout.setImmediate(false);
	
	// textFieldPolicyName
	textFieldPolicyName = new TextField();
	textFieldPolicyName.setCaption("Policy File Name");
	textFieldPolicyName.setImmediate(true);
	textFieldPolicyName.setWidth("-1px");
	textFieldPolicyName.setHeight("-1px");
	textFieldPolicyName.setInputPrompt("Enter filename eg. foobar.xml");
	textFieldPolicyName.setRequired(true);
	mainLayout.addComponent(textFieldPolicyName);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription
			.setInputPrompt("Enter a description for the Policy/PolicySet.");
	textAreaDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textAreaDescription);
	
	// optionPolicySet
	optionPolicySet = new OptionGroup();
	optionPolicySet.setCaption("Policy or PolicySet?");
	optionPolicySet.setImmediate(true);
	optionPolicySet
			.setDescription("Is the root level a Policy or Policy Set.");
	optionPolicySet.setWidth("-1px");
	optionPolicySet.setHeight("-1px");
	optionPolicySet.setRequired(true);
	mainLayout.addComponent(optionPolicySet);
	
	// comboAlgorithms
	comboAlgorithms = new ComboBox();
	comboAlgorithms.setCaption("Combining Algorithm");
	comboAlgorithms.setImmediate(false);
	comboAlgorithms.setDescription("Select the combining algorithm.");
	comboAlgorithms.setWidth("-1px");
	comboAlgorithms.setHeight("-1px");
	comboAlgorithms.setRequired(true);
	mainLayout.addComponent(comboAlgorithms);
	
	// 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;
}