Java Code Examples for com.vaadin.ui.TextField#setRequired()
The following examples show how to use
com.vaadin.ui.TextField#setRequired() .
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: SignUpViewImpl.java From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 | 5 votes |
private void buildForm() { username = new TextField("Username"); username.setWidth("100%"); username.setImmediate(true); username.setValidationVisible(false); username.setNullRepresentation(""); username.setRequired(true); form.addComponent(username); password = new PasswordField("Password"); password.setWidth("100%"); password.setImmediate(true); password.setValidationVisible(false); password.setNullRepresentation(""); password.setRequired(true); form.addComponent(password); firstName = new TextField("First name"); firstName.setWidth("100%"); firstName.setValidationVisible(false); firstName.setNullRepresentation(""); firstName.setImmediate(true); firstName.setRequired(true); form.addComponent(firstName); lastName = new TextField("Last name"); lastName.setWidth("100%"); lastName.setImmediate(true); lastName.setNullRepresentation(""); lastName.setValidationVisible(false); lastName.setRequired(true); form.addComponent(lastName); binder.bind(username, "username"); binder.bind(password, "password"); binder.bind(firstName, "firstName"); binder.bind(lastName, "lastName"); }
Example 2
Source File: BasicModel.java From chipster with MIT License | 5 votes |
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 3
Source File: VariableDefinitionEditorWindow.java From XACML with MIT License | 5 votes |
@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 4
Source File: ColumnSelectionWindow.java From XACML with MIT License | 5 votes |
@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 5
Source File: OldLoginView.java From gazpachoquest with GNU General Public License v3.0 | 4 votes |
public OldLoginView() { setSizeFull(); // Language bar in the top-right corner for selecting // invitation interface language final HorizontalLayout languageBar = new HorizontalLayout(); languageBar.setHeight("50px"); // addComponent(languageBar); // setComponentAlignment(languageBar, Alignment.TOP_RIGHT); // Allow selecting a language. We are in a constructor of a // CustomComponent, so preselecting the current // language of the application can not be done before // this (and the selection) component are attached to // the application. final ComboBox languageSelector = new ComboBox("Select a language") { @Override public void attach() { super.attach(); // setValue(getLocale()); } }; // for (int i=0; i<locales.length; i++) { String locale = "es"; languageSelector.addItem(locale); languageSelector.setItemCaption(locale, "español"); // Automatically select the current locale // if (locales[i].equals(getLocale())) languageSelector.setValue(locale); // } // Create the invitation input field invitationTextField = new TextField("Invitation key:"); invitationTextField.setWidth("300px"); invitationTextField.setRequired(true); invitationTextField.setInputPrompt("Your questionnair invitation key (eg. 12345678)"); invitationTextField.setInvalidAllowed(false); // Create login button enterButton = new Button("Enter", this); // Add both to a panel VerticalLayout fields = new VerticalLayout(languageSelector, invitationTextField, enterButton); fields.setCaption("Please enter your invitation key to access the questionnair"); fields.setSpacing(true); fields.setMargin(new MarginInfo(true, true, true, false)); fields.setSizeUndefined(); // The view root layout VerticalLayout viewLayout = new VerticalLayout(fields); viewLayout.setSizeFull(); viewLayout.setComponentAlignment(fields, Alignment.MIDDLE_CENTER); viewLayout.setStyleName(Reindeer.LAYOUT_BLUE); setCompositionRoot(viewLayout); }
Example 6
Source File: WinLogin.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
@Override public void attach() { // Window setIcon(Icons.LOGIN.resource()); setCaption(ViewProperties.getCaption("window.login")); setModal(true); setWidth("300px"); setResizable(false); setClosable(false); // Layout VerticalLayout layout = (VerticalLayout) getContent(); layout.setMargin(true); layout.setSpacing(true); // Form Form form = new Form(); form.addStyleName("form-login"); // ユーザ名 usernameField = new TextField(ViewProperties.getCaption("field.userName")); usernameField.setWidth("90%"); usernameField.focus(); // フォーカスを設定 usernameField.setRequired(true); usernameField.setRequiredError(ViewMessages.getMessage("IUI-000019")); form.getLayout().addComponent(usernameField); // パスワード passwordField = new TextField(ViewProperties.getCaption("field.password")); passwordField.setSecret(true); passwordField.setWidth("90%"); passwordField.setRequired(true); passwordField.setRequiredError(ViewMessages.getMessage("IUI-000020")); form.getLayout().addComponent(passwordField); layout.addComponent(form); // ログインボタン Button loginButton = new Button(ViewProperties.getCaption("button.login")); loginButton.setDescription(ViewProperties.getCaption("description.login")); loginButton.addListener(new ClickListener() { public void buttonClick(ClickEvent event) { loginButtonClick(event); } }); loginButton.setClickShortcut(KeyCode.ENTER); layout.addComponent(loginButton); layout.setComponentAlignment(loginButton, "right"); }
Example 7
Source File: HyperCSVPIPConfigurationComponent.java From XACML with MIT License | 4 votes |
@AutoGenerated private VerticalLayout buildMainLayout() { // common part: create layout mainLayout = new VerticalLayout(); mainLayout.setImmediate(false); mainLayout.setWidth("-1px"); mainLayout.setHeight("-1px"); mainLayout.setMargin(false); // top-level component properties setWidth("-1px"); setHeight("-1px"); // textFieldSource textFieldSource = new TextField(); textFieldSource.setCaption("CSV Source File"); textFieldSource.setImmediate(false); textFieldSource.setDescription("Path to CSV file"); textFieldSource.setWidth("-1px"); textFieldSource.setHeight("-1px"); textFieldSource.setInvalidAllowed(false); textFieldSource.setRequired(true); textFieldSource.setInputPrompt("Eg. /opt/app/data.csv"); mainLayout.addComponent(textFieldSource); // textFieldTarget textFieldTarget = new TextField(); textFieldTarget.setCaption("Table"); textFieldTarget.setImmediate(false); textFieldTarget.setDescription("Name of database table to be created."); textFieldTarget.setWidth("-1px"); textFieldTarget.setHeight("-1px"); textFieldTarget.setInvalidAllowed(false); textFieldTarget.setRequired(true); mainLayout.addComponent(textFieldTarget); // textFieldDefinition textFieldDefinition = new TextField(); textFieldDefinition.setCaption("Table Definition"); textFieldDefinition.setImmediate(false); textFieldDefinition.setDescription("SQL Table Definition"); textFieldDefinition.setWidth("-1px"); textFieldDefinition.setHeight("-1px"); textFieldDefinition.setInvalidAllowed(false); textFieldDefinition.setRequired(true); mainLayout.addComponent(textFieldDefinition); return mainLayout; }
Example 8
Source File: AttributeSimpleCreatorComponent.java From XACML with MIT License | 4 votes |
@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 Id"); textFieldAttributeId.setImmediate(false); textFieldAttributeId.setWidth("100.0%"); textFieldAttributeId.setHeight("-1px"); textFieldAttributeId.setInvalidAllowed(false); textFieldAttributeId.setRequired(true); mainLayout.addComponent(textFieldAttributeId); mainLayout.setExpandRatio(textFieldAttributeId, 1.0f); // textFieldContextPath textFieldContextPath = new TextField(); textFieldContextPath.setCaption("Context Path"); textFieldContextPath.setImmediate(false); textFieldContextPath.setDescription("The Selector's Context Path."); textFieldContextPath.setWidth("100.0%"); textFieldContextPath.setHeight("-1px"); textFieldContextPath .setInputPrompt("eg. md:record/md:patient/md:patient-number/text()"); mainLayout.addComponent(textFieldContextPath); mainLayout.setExpandRatio(textFieldContextPath, 1.0f); // horizontalLayout_1 horizontalLayout_1 = buildHorizontalLayout_1(); mainLayout.addComponent(horizontalLayout_1); mainLayout.setExpandRatio(horizontalLayout_1, 1.0f); return mainLayout; }
Example 9
Source File: LDAPPIPConfigurationComponent.java From XACML with MIT License | 4 votes |
@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"); // textFieldFactory textFieldFactory = new TextField(); textFieldFactory.setCaption("Initial Context Factory"); textFieldFactory.setImmediate(false); textFieldFactory.setWidth("-1px"); textFieldFactory.setHeight("-1px"); textFieldFactory.setInvalidAllowed(false); textFieldFactory.setRequired(true); textFieldFactory.setInputPrompt("com.sun.jndi.ldap.LdapCtxFactory"); mainLayout.addComponent(textFieldFactory); mainLayout.setExpandRatio(textFieldFactory, 1.0f); // textFieldProviderURL textFieldProviderURL = new TextField(); textFieldProviderURL.setCaption("Provider URL"); textFieldProviderURL.setImmediate(false); textFieldProviderURL.setWidth("-1px"); textFieldProviderURL.setHeight("-1px"); textFieldProviderURL.setInvalidAllowed(false); textFieldProviderURL.setRequired(true); textFieldProviderURL .setInputPrompt("Eg. ldap://localhost:389/o=JNDITutorial"); mainLayout.addComponent(textFieldProviderURL); mainLayout.setExpandRatio(textFieldProviderURL, 1.0f); // comboBoxAuthentication comboBoxAuthentication = new ComboBox(); comboBoxAuthentication.setCaption("Authentication"); comboBoxAuthentication.setImmediate(false); comboBoxAuthentication.setWidth("-1px"); comboBoxAuthentication.setHeight("-1px"); comboBoxAuthentication.setRequired(true); mainLayout.addComponent(comboBoxAuthentication); mainLayout.setExpandRatio(comboBoxAuthentication, 1.0f); // textFieldPrincipal textFieldPrincipal = new TextField(); textFieldPrincipal.setCaption("Principal"); textFieldPrincipal.setImmediate(false); textFieldPrincipal.setWidth("-1px"); textFieldPrincipal.setHeight("-1px"); textFieldPrincipal.setNullSettingAllowed(true); mainLayout.addComponent(textFieldPrincipal); mainLayout.setExpandRatio(textFieldPrincipal, 1.0f); // textFieldCredentials textFieldCredentials = new TextField(); textFieldCredentials.setCaption("Credentials"); textFieldCredentials.setImmediate(false); textFieldCredentials.setWidth("-1px"); textFieldCredentials.setHeight("-1px"); textFieldCredentials.setNullSettingAllowed(true); mainLayout.addComponent(textFieldCredentials); mainLayout.setExpandRatio(textFieldCredentials, 1.0f); // textFieldScope textFieldScope = new TextField(); textFieldScope.setCaption("Scope"); textFieldScope.setImmediate(false); textFieldScope.setWidth("-1px"); textFieldScope.setHeight("-1px"); textFieldScope.setInvalidAllowed(false); textFieldScope.setRequired(true); textFieldScope.setInputPrompt("Eg. subtree"); mainLayout.addComponent(textFieldScope); // 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 10
Source File: PolicySetEditorWindow.java From XACML with MIT License | 4 votes |
@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 11
Source File: EditPDPWindow.java From XACML with MIT License | 4 votes |
@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 12
Source File: PolicyNameEditorWindow.java From XACML with MIT License | 4 votes |
@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; }
Example 13
Source File: PolicyEditorWindow.java From XACML with MIT License | 4 votes |
@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 14
Source File: AttributeValueEditorWindow.java From XACML with MIT License | 4 votes |
@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 15
Source File: VariableReferenceEditorWindow.java From XACML with MIT License | 4 votes |
@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"); // listSelectVariables listSelectVariables = new ListSelect(); listSelectVariables.setCaption("Defined Variables"); listSelectVariables.setImmediate(false); listSelectVariables.setWidth("100.0%"); listSelectVariables.setHeight("-1px"); mainLayout.addComponent(listSelectVariables); mainLayout.setExpandRatio(listSelectVariables, 1.0f); // textFieldVariable textFieldVariable = new TextField(); textFieldVariable.setCaption("Variable"); textFieldVariable.setImmediate(false); textFieldVariable.setWidth("-1px"); textFieldVariable.setHeight("-1px"); textFieldVariable.setInvalidAllowed(false); textFieldVariable.setRequired(true); textFieldVariable.setInputPrompt("Eg. \"12345\" or \"myVariable1\""); mainLayout.addComponent(textFieldVariable); mainLayout.setExpandRatio(textFieldVariable, 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 16
Source File: AdviceEditorWindow.java From XACML with MIT License | 4 votes |
@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 17
Source File: EditPDPGroupWindow.java From XACML with MIT License | 4 votes |
@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; }
Example 18
Source File: PIPParamEditorWindow.java From XACML with MIT License | 4 votes |
@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 19
Source File: ObligationEditorWindow.java From XACML with MIT License | 4 votes |
@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"); // textFieldObligationID textFieldObligationID = new TextField(); textFieldObligationID.setCaption("Obligation ID"); textFieldObligationID.setImmediate(false); textFieldObligationID.setWidth("-1px"); textFieldObligationID.setHeight("-1px"); textFieldObligationID.setInvalidAllowed(false); textFieldObligationID.setRequired(true); textFieldObligationID.setInputPrompt("Eg. urn:com:foo:obligation:sample"); mainLayout.addComponent(textFieldObligationID); // optionGroupFullfillOn optionGroupFullfillOn = new OptionGroup(); optionGroupFullfillOn.setCaption("Fulfill On"); optionGroupFullfillOn.setImmediate(false); optionGroupFullfillOn.setWidth("-1px"); optionGroupFullfillOn.setHeight("-1px"); optionGroupFullfillOn.setInvalidAllowed(false); optionGroupFullfillOn.setRequired(true); mainLayout.addComponent(optionGroupFullfillOn); // 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: AttributeAssignmentExpressionEditorWindow.java From XACML with MIT License | 4 votes |
@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; }