Java Code Examples for com.vaadin.ui.TextField#setInputPrompt()
The following examples show how to use
com.vaadin.ui.TextField#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: RegexpEditorComponent.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"); // 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 2
Source File: CustomPIPConfigurationComponent.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(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 3
Source File: RangeEditorComponent.java From XACML with MIT License | 5 votes |
@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); verticalLayout_2.setSpacing(true); // textFieldTestInput textFieldTestInput = new TextField(); textFieldTestInput.setCaption("Value"); textFieldTestInput.setImmediate(true); textFieldTestInput.setDescription("Enter a value to test against."); textFieldTestInput.setWidth("-1px"); textFieldTestInput.setHeight("-1px"); textFieldTestInput.setInputPrompt("eg. 50"); verticalLayout_2.addComponent(textFieldTestInput); // buttonValidate buttonValidate = new Button(); buttonValidate.setCaption("Test"); buttonValidate.setImmediate(true); buttonValidate .setDescription("Click to test if value is within the range."); buttonValidate.setWidth("-1px"); buttonValidate.setHeight("-1px"); verticalLayout_2.addComponent(buttonValidate); verticalLayout_2.setComponentAlignment(buttonValidate, new Alignment(48)); return verticalLayout_2; }
Example 4
Source File: RangeEditorComponent.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayout_2() { // common part: create layout horizontalLayout_2 = new HorizontalLayout(); horizontalLayout_2.setImmediate(false); horizontalLayout_2.setWidth("-1px"); horizontalLayout_2.setHeight("-1px"); horizontalLayout_2.setMargin(false); horizontalLayout_2.setSpacing(true); // comboBoxMax comboBoxMax = new ComboBox(); comboBoxMax.setCaption("Maximum Type"); comboBoxMax.setImmediate(true); comboBoxMax.setDescription("Select the type for the maximum."); comboBoxMax.setWidth("-1px"); comboBoxMax.setHeight("-1px"); horizontalLayout_2.addComponent(comboBoxMax); // textFieldMax textFieldMax = new TextField(); textFieldMax.setCaption("Maximum Value"); textFieldMax.setImmediate(true); textFieldMax.setDescription("Enter a value for the maxmum."); textFieldMax.setWidth("-1px"); textFieldMax.setHeight("-1px"); textFieldMax.setInvalidAllowed(false); textFieldMax.setInputPrompt("eg. 100"); horizontalLayout_2.addComponent(textFieldMax); return horizontalLayout_2; }
Example 5
Source File: RangeEditorComponent.java From XACML with MIT License | 5 votes |
@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); // comboBoxMin comboBoxMin = new ComboBox(); comboBoxMin.setCaption("Minimum Type"); comboBoxMin.setImmediate(true); comboBoxMin.setDescription("Select the type for the minimum."); comboBoxMin.setWidth("-1px"); comboBoxMin.setHeight("-1px"); horizontalLayout_1.addComponent(comboBoxMin); // textFieldMin textFieldMin = new TextField(); textFieldMin.setCaption("Minimum Value"); textFieldMin.setImmediate(true); textFieldMin.setDescription("Enter a value for the minimum."); textFieldMin.setWidth("-1px"); textFieldMin.setHeight("-1px"); textFieldMin.setInvalidAllowed(false); textFieldMin.setInputPrompt("eg. 1"); horizontalLayout_1.addComponent(textFieldMin); horizontalLayout_1 .setComponentAlignment(textFieldMin, new Alignment(9)); return horizontalLayout_1; }
Example 6
Source File: RegexpEditorComponent.java From XACML with MIT License | 5 votes |
@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 7
Source File: SubDomainEditorWindow.java From XACML with MIT License | 5 votes |
@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 8
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 9
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 10
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 11
Source File: SignInViewImpl.java From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 | 4 votes |
@Override public void postConstruct() { super.postConstruct(); setSizeFull(); layout = new VerticalLayout(); layout.setSizeFull(); layout.setSpacing(true); setCompositionRoot(layout); caption = new Label("Sign in to Vaadin4Spring Security Demo"); caption.addStyleName(ValoTheme.LABEL_H2); caption.setSizeUndefined(); layout.addComponent(caption); layout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER); loginPanel = new VerticalLayout(); loginPanel.setSizeUndefined(); loginPanel.setSpacing(true); loginPanel.setMargin(true); layout.addComponent(loginPanel); layout.setComponentAlignment(loginPanel, Alignment.MIDDLE_CENTER); layout.setExpandRatio(loginPanel, 1); errorMessage = new Label(); errorMessage.setWidth("300px"); errorMessage.addStyleName(ValoTheme.LABEL_FAILURE); errorMessage.setVisible(false); loginPanel.addComponent(errorMessage); username = new TextField("Username"); username.setImmediate(true); username.setWidth("300px"); username.setNullRepresentation(""); username.setInputPrompt("Enter your username"); loginPanel.addComponent(username); password = new PasswordField("Password"); password.setImmediate(true); password.setWidth("300px"); password.setNullRepresentation(""); loginPanel.addComponent(password); rememberMe = new CheckBox("Remember me"); rememberMe.setValue(false); rememberMe.addStyleName(ValoTheme.CHECKBOX_LARGE); loginPanel.addComponent(rememberMe); btnLogin = new Button("Signin", FontAwesome.UNLOCK); btnLogin.addStyleName(ValoTheme.BUTTON_PRIMARY); btnLogin.addClickListener(this); btnLogin.setWidth("100%"); loginPanel.addComponent(btnLogin); final Label infoLabel = new Label(FontAwesome.INFO_CIRCLE.getHtml() + " You can sign in as: <br/>\"user\" with password \"user\" <br/>\"admin\" with password \"admin\".", ContentMode.HTML); infoLabel.setWidth("300px"); loginPanel.addComponent(infoLabel); }
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: 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 15
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 16
Source File: CSVPIPConfigurationComponent.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"); // textFieldFile textFieldFile = new TextField(); textFieldFile.setCaption("Path to CSV File"); textFieldFile.setImmediate(false); textFieldFile .setDescription("This is the path to CSV file on the PDP node."); textFieldFile.setWidth("-1px"); textFieldFile.setHeight("-1px"); textFieldFile.setInvalidAllowed(false); textFieldFile.setRequired(true); textFieldFile .setInputPrompt("Eg. \"c:\\data.csv\" \"http://foo.com/data.csv\""); mainLayout.addComponent(textFieldFile); mainLayout.setExpandRatio(textFieldFile, 1.0f); // textFieldDelimiter textFieldDelimiter = new TextField(); textFieldDelimiter.setCaption("Delimiter"); textFieldDelimiter.setImmediate(false); textFieldDelimiter .setDescription("Enter a separator character or string that delineates columns in each row."); textFieldDelimiter.setWidth("-1px"); textFieldDelimiter.setHeight("-1px"); textFieldDelimiter.setInputPrompt("Eg. \",\" or \"|\""); textFieldDelimiter.setNullSettingAllowed(true); mainLayout.addComponent(textFieldDelimiter); mainLayout.setExpandRatio(textFieldDelimiter, 1.0f); // textFieldQuote textFieldQuote = new TextField(); textFieldQuote.setCaption("Quote"); textFieldQuote.setImmediate(false); textFieldQuote .setDescription("Enter character used for quoted elements."); textFieldQuote.setWidth("-1px"); textFieldQuote.setHeight("-1px"); textFieldQuote.setInputPrompt("Eg. \" or '"); textFieldQuote.setNullSettingAllowed(true); mainLayout.addComponent(textFieldQuote); // textFieldSkip textFieldSkip = new TextField(); textFieldSkip.setCaption("Skip Lines"); textFieldSkip.setImmediate(false); textFieldSkip .setDescription("Skips the number of lines at the beginning of the file."); textFieldSkip.setWidth("-1px"); textFieldSkip.setHeight("-1px"); textFieldSkip.setInputPrompt("Eg. 1 or 2"); mainLayout.addComponent(textFieldSkip); return mainLayout; }
Example 17
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 18
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 19
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 20
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; }