Java Code Examples for com.vaadin.ui.TextField#setWidth()

The following examples show how to use com.vaadin.ui.TextField#setWidth() . 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: MyCloudEdit.java    From primecloud-controller with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void attach() {
    // myCloud名
    cloudNameField = new TextField(ViewProperties.getCaption("field.cloudName"));
    getLayout().addComponent(cloudNameField);

    // ドメイン名
    domainNameField = new TextField(ViewProperties.getCaption("field.domainName"));
    domainNameField.setWidth("100%");
    getLayout().addComponent(domainNameField);

    // コメント
    commentField = new TextField(ViewProperties.getCaption("field.comment"));
    commentField.setWidth("100%");
    getLayout().addComponent(commentField);

    cloudNameField.focus();

    initValidation();
}
 
Example 2
Source File: WinServiceEdit.java    From primecloud-controller with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void attach() {
    setHeight(TAB_HEIGHT);
    setMargin(false, true, false, true);
    setSpacing(false);

    // カスタムパラメータ1
    customParam1Field = new TextField(ViewProperties.getCaption("field.customParam1"));
    customParam1Field.setWidth("90%");
    form.getLayout().addComponent(customParam1Field);

    // カスタムパラメータ2
    customParam2Field = new TextField(ViewProperties.getCaption("field.customParam2"));
    customParam2Field.setWidth("90%");
    form.getLayout().addComponent(customParam2Field);

    // カスタムパラメータ3
    customParam3Field = new TextField(ViewProperties.getCaption("field.customParam3"));
    customParam3Field.setWidth("90%");
    form.getLayout().addComponent(customParam3Field);

    form.setReadOnly(true);
    addComponent(form);

    initValidation();
}
 
Example 3
Source File: ColumnSelectionWindow.java    From XACML with MIT License 5 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");
	
	// textFieldColumn
	textFieldColumn = new TextField();
	textFieldColumn.setCaption("Column");
	textFieldColumn.setImmediate(false);
	textFieldColumn.setDescription("0-based index into CSV line");
	textFieldColumn.setWidth("-1px");
	textFieldColumn.setHeight("-1px");
	textFieldColumn.setRequired(true);
	textFieldColumn.setInputPrompt("Eg. ‘0'");
	mainLayout.addComponent(textFieldColumn);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 4
Source File: SubDomainEditorWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private FormLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new FormLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldSubdomain
	textFieldSubdomain = new TextField();
	textFieldSubdomain.setCaption("Enter Sub Domain");
	textFieldSubdomain.setImmediate(false);
	textFieldSubdomain
			.setDescription("You can enter sub domain name - do not use spaces or wildcard characters.");
	textFieldSubdomain.setWidth("-1px");
	textFieldSubdomain.setHeight("-1px");
	textFieldSubdomain.setInvalidAllowed(false);
	textFieldSubdomain
			.setInputPrompt("Examples: sales hr business marketing.");
	mainLayout.addComponent(textFieldSubdomain);
	mainLayout.setExpandRatio(textFieldSubdomain, 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;
}
 
Example 5
Source File: AbstractMetadataPopupLayout.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
private TextField createKeyTextField() {
    final TextField keyField = new TextFieldBuilder(MetaData.KEY_MAX_SIZE).caption(i18n.getMessage("textfield.key"))
            .required(true, i18n).id(UIComponentIdProvider.METADATA_KEY_FIELD_ID).buildTextComponent();
    keyField.addTextChangeListener(this::onKeyChange);
    keyField.setTextChangeEventMode(TextChangeEventMode.LAZY);
    keyField.setTextChangeTimeout(INPUT_DEBOUNCE_TIMEOUT);
    keyField.setWidth("100%");
    return keyField;
}
 
Example 6
Source File: BasicModel.java    From chipster with MIT License 5 votes vote down vote up
private void initElements() {
	
	lbName = new Label("Display name:");
	lbId = new Label();
	lbDescription = new Label("Description:");
	lbOptional = new Label("Optional:");
	
	name = new TextField();
	name.setWidth(WIDTH);
	name.setDescription("Display name for the element");
	name.setImmediate(true);
	name.addTextChangeListener(new CSCTextChangeListener(this));
	
	id = new TextField();
	id.setDescription("file name or unique identification");
	id.setImmediate(true);
	id.setRequired(true);
	id.setRequiredError(REQUIRED_TEXT);
	id.setWidth(WIDTH);
	id.addTextChangeListener(new CSCTextChangeListener(this, true));
	
	description = new TextArea();
	description.setWidth(WIDTH);
	description.setDescription("Short description");
	
	layout = new HorizontalLayout();
	
	prefix = new TextField();
	postfix = new TextField();
	
	layout.addComponent(prefix);
	layout.addComponent(new Label(MULTI_FILE_TEXT));
	layout.addComponent(postfix);
	
	optional = new CheckBox();
	optional.setDescription("Is this element optional");
	optional.setImmediate(true);
}
 
Example 7
Source File: RegexpEditorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
	// common part: create layout
	verticalLayout_2 = new VerticalLayout();
	verticalLayout_2.setImmediate(false);
	verticalLayout_2.setWidth("100.0%");
	verticalLayout_2.setHeight("100.0%");
	verticalLayout_2.setMargin(false);
	
	// textFieldTestValue
	textFieldTestValue = new TextField();
	textFieldTestValue.setCaption("Test Value");
	textFieldTestValue.setImmediate(true);
	textFieldTestValue
			.setDescription("Enter a value to match against the regular expression.");
	textFieldTestValue.setWidth("-1px");
	textFieldTestValue.setHeight("-1px");
	textFieldTestValue.setInputPrompt("eg. example");
	verticalLayout_2.addComponent(textFieldTestValue);
	
	// buttonTest
	buttonTest = new Button();
	buttonTest.setCaption("Test");
	buttonTest.setImmediate(true);
	buttonTest.setWidth("-1px");
	buttonTest.setHeight("-1px");
	verticalLayout_2.addComponent(buttonTest);
	verticalLayout_2.setComponentAlignment(buttonTest, new Alignment(48));
	
	return verticalLayout_2;
}
 
Example 8
Source File: CustomPIPConfigurationComponent.java    From XACML with MIT License 5 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(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldClassname
	textFieldClassname = new TextField();
	textFieldClassname.setCaption("Java Classname");
	textFieldClassname.setImmediate(false);
	textFieldClassname
			.setDescription("Java classname of the code implementing the custom PIP.");
	textFieldClassname.setWidth("-1px");
	textFieldClassname.setHeight("-1px");
	textFieldClassname.setInputPrompt("Eg. com.foo.MyPIP");
	mainLayout.addComponent(textFieldClassname);
	mainLayout.setExpandRatio(textFieldClassname, 1.0f);
	
	// pipParameterComponent
	pipParameterComponent = new PIPParameterComponent(this.entity.getEntity());
	pipParameterComponent.setImmediate(false);
	pipParameterComponent.setWidth("-1px");
	pipParameterComponent.setHeight("-1px");
	mainLayout.addComponent(pipParameterComponent);
	
	return mainLayout;
}
 
Example 9
Source File: RegexpEditorComponent.java    From XACML with MIT License 5 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");
	
	// textFieldExpression
	textFieldExpression = new TextField();
	textFieldExpression.setCaption("Regular Expression");
	textFieldExpression.setImmediate(true);
	textFieldExpression
			.setDescription("Create a regular expression used to constrain attribute values.");
	textFieldExpression.setWidth("-1px");
	textFieldExpression.setHeight("-1px");
	textFieldExpression.setInvalidAllowed(false);
	textFieldExpression.setInputPrompt("eg. [a-zA-Z0-9]");
	mainLayout.addComponent(textFieldExpression);
	mainLayout.setExpandRatio(textFieldExpression, 1.0f);
	
	// panelTester
	panelTester = buildPanelTester();
	mainLayout.addComponent(panelTester);
	mainLayout.setExpandRatio(panelTester, 1.0f);
	
	return mainLayout;
}
 
Example 10
Source File: VariableDefinitionEditorWindow.java    From XACML with MIT License 5 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");
	
	// textFieldID
	textFieldID = new TextField();
	textFieldID.setCaption("Variable ID");
	textFieldID.setImmediate(false);
	textFieldID.setWidth("-1px");
	textFieldID.setHeight("-1px");
	textFieldID.setInvalidAllowed(false);
	textFieldID.setRequired(true);
	textFieldID.setNullRepresentation("");
	mainLayout.addComponent(textFieldID);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save and Continue");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 11
Source File: WinLoadBalancerAdd.java    From primecloud-controller with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void attach() {
    // LB名
    loadBalancerNameField = new TextField(ViewProperties.getCaption("field.loadBalancerName"));
    getLayout().addComponent(loadBalancerNameField);

    // コメント欄
    commentField = new TextField(ViewProperties.getCaption("field.comment"));
    commentField.setWidth("95%");
    getLayout().addComponent(commentField);

    // クラウド選択
    cloudTable = new SelectCloudTable();
    getLayout().addComponent(cloudTable);
    cloudTable.addListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            cloudTableSelect(event);
        }
    });

    // LB種別選択
    typeTable = new SelectTypeTable();
    getLayout().addComponent(typeTable);

    // 割り当てサービス選択
    serviceTable = new SelectServiceTable();
    getLayout().addComponent(serviceTable);

    initValidation();
}
 
Example 12
Source File: PIPParamEditorWindow.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");
	
	// textFieldName
	textFieldName = new TextField();
	textFieldName.setCaption("Parameter Name");
	textFieldName.setImmediate(false);
	textFieldName.setWidth("-1px");
	textFieldName.setHeight("-1px");
	textFieldName.setInvalidAllowed(false);
	textFieldName.setRequired(true);
	mainLayout.addComponent(textFieldName);
	
	// textFieldValue
	textFieldValue = new TextField();
	textFieldValue.setCaption("Parameter Value");
	textFieldValue.setImmediate(false);
	textFieldValue.setWidth("-1px");
	textFieldValue.setHeight("-1px");
	textFieldValue.setInvalidAllowed(false);
	textFieldValue.setRequired(true);
	mainLayout.addComponent(textFieldValue);
	
	// 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;
}
 
Example 13
Source File: AdviceEditorWindow.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");
	
	// textFieldAdviceID
	textFieldAdviceID = new TextField();
	textFieldAdviceID.setCaption("Advice ID");
	textFieldAdviceID.setImmediate(false);
	textFieldAdviceID.setWidth("-1px");
	textFieldAdviceID.setHeight("-1px");
	textFieldAdviceID.setInvalidAllowed(false);
	textFieldAdviceID.setRequired(true);
	textFieldAdviceID.setInputPrompt("Eg. urn:com:foo:advice:sample");
	mainLayout.addComponent(textFieldAdviceID);
	
	// optionGroupEffect
	optionGroupEffect = new OptionGroup();
	optionGroupEffect.setCaption("Applies To");
	optionGroupEffect.setImmediate(false);
	optionGroupEffect.setWidth("-1px");
	optionGroupEffect.setHeight("-1px");
	optionGroupEffect.setInvalidAllowed(false);
	optionGroupEffect.setRequired(true);
	mainLayout.addComponent(optionGroupEffect);
	
	// 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;
}
 
Example 14
Source File: ApplyEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter A Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("50.0%");
	textAreaDescription.setHeight("-1px");
	horizontalLayout_1.addComponent(textAreaDescription);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter Function By ID");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(textFieldFilter);
	horizontalLayout_1.setComponentAlignment(textFieldFilter,
			new Alignment(9));
	
	// comboBoxDatatypeFilter
	comboBoxDatatypeFilter = new ComboBox();
	comboBoxDatatypeFilter.setCaption("Filter By Data Type");
	comboBoxDatatypeFilter.setImmediate(false);
	comboBoxDatatypeFilter.setWidth("-1px");
	comboBoxDatatypeFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
	horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter,
			new Alignment(9));
	
	// checkBoxFilterIsBag
	checkBoxFilterIsBag = new CheckBox();
	checkBoxFilterIsBag.setCaption("Is Bag Filter");
	checkBoxFilterIsBag.setImmediate(false);
	checkBoxFilterIsBag.setWidth("-1px");
	checkBoxFilterIsBag.setHeight("-1px");
	horizontalLayout_1.addComponent(checkBoxFilterIsBag);
	horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag,
			new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 15
Source File: SQLPIPConfigurationComponent.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(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxConnectionType
	comboBoxConnectionType = new ComboBox();
	comboBoxConnectionType.setCaption("Type of SQL Connection");
	comboBoxConnectionType.setImmediate(false);
	comboBoxConnectionType.setWidth("-1px");
	comboBoxConnectionType.setHeight("-1px");
	mainLayout.addComponent(comboBoxConnectionType);
	
	// textFieldDataSource
	textFieldDataSource = new TextField();
	textFieldDataSource.setCaption("Data Source");
	textFieldDataSource.setImmediate(false);
	textFieldDataSource.setWidth("-1px");
	textFieldDataSource.setHeight("-1px");
	mainLayout.addComponent(textFieldDataSource);
	mainLayout.setExpandRatio(textFieldDataSource, 1.0f);
	
	// comboBoxSQLDriver
	comboBoxSQLDriver = new ComboBox();
	comboBoxSQLDriver.setCaption("JDBC Driver");
	comboBoxSQLDriver.setImmediate(false);
	comboBoxSQLDriver.setWidth("-1px");
	comboBoxSQLDriver.setHeight("-1px");
	mainLayout.addComponent(comboBoxSQLDriver);
	mainLayout.setExpandRatio(comboBoxSQLDriver, 1.0f);
	
	// textFieldConnectionURL
	textFieldConnectionURL = new TextField();
	textFieldConnectionURL.setCaption("Connection URL");
	textFieldConnectionURL.setImmediate(false);
	textFieldConnectionURL.setWidth("-1px");
	textFieldConnectionURL.setHeight("-1px");
	mainLayout.addComponent(textFieldConnectionURL);
	mainLayout.setExpandRatio(textFieldConnectionURL, 1.0f);
	
	// textFieldUser
	textFieldUser = new TextField();
	textFieldUser.setCaption("User");
	textFieldUser.setImmediate(false);
	textFieldUser.setWidth("-1px");
	textFieldUser.setHeight("-1px");
	mainLayout.addComponent(textFieldUser);
	mainLayout.setExpandRatio(textFieldUser, 1.0f);
	
	// textFieldPassword
	textFieldPassword = new PasswordField();
	textFieldPassword.setCaption("Password");
	textFieldPassword.setImmediate(false);
	textFieldPassword.setWidth("-1px");
	textFieldPassword.setHeight("-1px");
	mainLayout.addComponent(textFieldPassword);
	mainLayout.setExpandRatio(textFieldPassword, 1.0f);
	
	// buttonTest
	buttonTest = new Button();
	buttonTest.setCaption("Test Connection");
	buttonTest.setImmediate(true);
	buttonTest.setWidth("-1px");
	buttonTest.setHeight("-1px");
	mainLayout.addComponent(buttonTest);
	mainLayout.setComponentAlignment(buttonTest, new Alignment(48));
	
	return mainLayout;
}
 
Example 16
Source File: AttributeAssignmentExpressionEditorWindow.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");
	
	// textFieldAttributeID
	textFieldAttributeID = new TextField();
	textFieldAttributeID.setCaption("Attribute Assignment ID");
	textFieldAttributeID.setImmediate(false);
	textFieldAttributeID.setWidth("-1px");
	textFieldAttributeID.setHeight("-1px");
	textFieldAttributeID.setInvalidAllowed(false);
	textFieldAttributeID.setRequired(true);
	mainLayout.addComponent(textFieldAttributeID);
	
	// textFieldIssuer
	textFieldIssuer = new TextField();
	textFieldIssuer.setCaption("Issuer (Optional)");
	textFieldIssuer.setImmediate(false);
	textFieldIssuer.setWidth("-1px");
	textFieldIssuer.setHeight("-1px");
	textFieldIssuer.setNullSettingAllowed(true);
	mainLayout.addComponent(textFieldIssuer);
	
	// tableCategories
	tableCategories = new Table();
	tableCategories.setCaption("Category (Optional)");
	tableCategories.setImmediate(false);
	tableCategories.setWidth("100.0%");
	tableCategories.setHeight("-1px");
	mainLayout.addComponent(tableCategories);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 17
Source File: PolicySetEditorWindow.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");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	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;
}
 
Example 18
Source File: EditPDPWindow.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");
	
	// textId
	textId = new TextField();
	textId.setCaption("PDP URL");
	textId.setImmediate(false);
	textId.setDescription("The URL is the ID of the PDP");
	textId.setWidth("-1px");
	textId.setHeight("-1px");
	textId.setRequired(true);
	textId.setInputPrompt("Eg. http://localhost:8080/pdp");
	mainLayout.addComponent(textId);
	
	// textName
	textName = new TextField();
	textName.setCaption("PDP Name");
	textName.setImmediate(false);
	textName.setWidth("-1px");
	textName.setHeight("-1px");
	mainLayout.addComponent(textName);
	
	// textDescription
	textDescription = new TextArea();
	textDescription.setCaption("PDP Description");
	textDescription.setImmediate(false);
	textDescription.setWidth("100.0%");
	textDescription.setHeight("-1px");
	textDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textDescription);
	mainLayout.setExpandRatio(textDescription, 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;
}
 
Example 19
Source File: AttributeValueEditorWindow.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");
	
	// comboBoxDatatype
	comboBoxDatatype = new ComboBox();
	comboBoxDatatype.setCaption("Select Datatype");
	comboBoxDatatype.setImmediate(false);
	comboBoxDatatype.setWidth("-1px");
	comboBoxDatatype.setHeight("-1px");
	comboBoxDatatype.setInvalidAllowed(false);
	comboBoxDatatype.setRequired(true);
	mainLayout.addComponent(comboBoxDatatype);
	
	// textFieldValue
	textFieldValue = new TextField();
	textFieldValue.setCaption("Attribute Value");
	textFieldValue.setImmediate(false);
	textFieldValue.setWidth("100.0%");
	textFieldValue.setHeight("-1px");
	textFieldValue.setInvalidAllowed(false);
	textFieldValue.setRequired(true);
	mainLayout.addComponent(textFieldValue);
	
	// 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;
}
 
Example 20
Source File: EditPDPGroupWindow.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("100.0%");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textName
	textName = new TextField();
	textName.setCaption("Group Name");
	textName.setImmediate(false);
	textName.setWidth("-1px");
	textName.setHeight("-1px");
	textName.setRequired(true);
	mainLayout.addComponent(textName);
	
	// textDescription
	textDescription = new TextArea();
	textDescription.setCaption("Group Description");
	textDescription.setImmediate(false);
	textDescription.setWidth("100.0%");
	textDescription.setHeight("-1px");
	textDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textDescription);
	mainLayout.setExpandRatio(textDescription, 1.0f);
	
	// tablePolicies
	tablePolicies = new Table();
	tablePolicies.setCaption("Policies");
	tablePolicies.setImmediate(false);
	tablePolicies.setWidth("-1px");
	tablePolicies.setHeight("-1px");
	mainLayout.addComponent(tablePolicies);
	mainLayout.setExpandRatio(tablePolicies, 1.0f);
	
	// tablePIP
	tablePIP = new Table();
	tablePIP.setCaption("PIP Configurations");
	tablePIP.setImmediate(false);
	tablePIP.setWidth("-1px");
	tablePIP.setHeight("-1px");
	mainLayout.addComponent(tablePIP);
	mainLayout.setExpandRatio(tablePIP, 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;
}