Java Code Examples for com.vaadin.ui.TextField#setImmediate()
The following examples show how to use
com.vaadin.ui.TextField#setImmediate() .
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: WinServerEdit.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override public void attach() { setHeight(TAB_HEIGHT); setMargin(false, true, false, true); setSpacing(false); // サーバサイズ sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize")); sizeSelect.setNullSelectionAllowed(false); form.getLayout().addComponent(sizeSelect); // キーペア keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair")); keySelect.setNullSelectionAllowed(false); keySelect.addContainerProperty(KEY_CAPTION_ID, String.class, null); keySelect.setItemCaptionPropertyId(KEY_CAPTION_ID); keySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); // Windowsの場合はキーペアを無効にする if (StringUtils.startsWith(image.getImage().getOs(), PCCConstant.OS_NAME_WIN)) { keySelect.setEnabled(false); } form.getLayout().addComponent(keySelect); // クラスタ clusterSelect = new ComboBox(ViewProperties.getCaption("field.cluster")); clusterSelect.setNullSelectionAllowed(false); form.getLayout().addComponent(clusterSelect); // ルートサイズ rootSizeField = new TextField(ViewProperties.getCaption("field.rootSize")); rootSizeField.setImmediate(true); form.getLayout().addComponent(rootSizeField); addComponent(form); }
Example 2
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 3
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 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: 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 6
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 7
Source File: WinLoadBalancerEdit.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
@Override public void attach() { setHeight(TAB_HEIGHT); setMargin(false, true, true, true); setSpacing(false); // メインフォーム Form mainForm = new Form(); addComponent(mainForm); // 監視プロトコル checkProtocolSelect = new ComboBox(ViewProperties.getCaption("field.checkProtocol")); checkProtocolSelect.setWidth(TEXT_WIDTH); checkProtocolSelect.setImmediate(true); checkProtocolSelect.setNullSelectionAllowed(false); checkProtocolSelect.addListener(new Property.ValueChangeListener() { @Override public void valueChange(Property.ValueChangeEvent event) { checkProtocolValueChange(event); } }); mainForm.getLayout().addComponent(checkProtocolSelect); // 監視ポート checkPortField = new TextField(ViewProperties.getCaption("field.checkPort")); checkPortField.setWidth(TEXT_WIDTH); mainForm.getLayout().addComponent(checkPortField); // 監視Path checkPathField = new TextField(ViewProperties.getCaption("field.checkPath")); checkPathField.setImmediate(true); mainForm.getLayout().addComponent(checkPathField); // ヘルスチェック詳細設定パネル Panel panel = new Panel(ViewProperties.getCaption("field.healthCheckDetail")); ((Layout) panel.getContent()).setMargin(false, false, false, true); ((Layout) panel.getContent()).setHeight("200px"); ((Layout) panel.getContent()).setWidth("315px"); mainForm.getLayout().addComponent(panel); // サブフォーム Form subForm = new Form(); subForm.setStyleName("panel-healthcheck-setting"); subForm.getLayout().setMargin(false, false, false, false); panel.addComponent(subForm); // タイムアウト時間 checkTimeoutField = new TextField(ViewProperties.getCaption("field.checkTimeout")); checkTimeoutField.setWidth(TEXT_WIDTH); subForm.getLayout().addComponent(checkTimeoutField); // ヘルスチェック間隔 checkIntervalField = new TextField(ViewProperties.getCaption("field.checkInterval")); checkIntervalField.setWidth(TEXT_WIDTH); subForm.getLayout().addComponent(checkIntervalField); // 障害閾値 unhealthyThresholdField = new TextField(ViewProperties.getCaption("field.checkDownThreshold")); unhealthyThresholdField.setWidth(TEXT_WIDTH); subForm.getLayout().addComponent(unhealthyThresholdField); // 復帰閾値 healthyThresholdField = new TextField(ViewProperties.getCaption("field.checkRecoverThreshold")); healthyThresholdField.setWidth(TEXT_WIDTH); subForm.getLayout().addComponent(healthyThresholdField); // UltraMonkeyロードバランサの場合、復帰閾値は設定できない if (PCCConstant.LOAD_BALANCER_ULTRAMONKEY.equals(loadBalancerType)) { healthyThresholdField.setEnabled(false); } initValidation(); }
Example 8
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 9
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 10
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 11
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 12
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 13
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 14
Source File: PIPSQLResolverEditorWindow.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"); // textAreaSelect textAreaSelect = new TextArea(); textAreaSelect.setCaption("SQL Select Statement"); textAreaSelect.setImmediate(false); textAreaSelect.setWidth("100.0%"); textAreaSelect.setHeight("-1px"); textAreaSelect.setInvalidAllowed(false); textAreaSelect.setRequired(true); mainLayout.addComponent(textAreaSelect); mainLayout.setExpandRatio(textAreaSelect, 1.0f); // textFieldBase textFieldBase = new TextField(); textFieldBase.setCaption("Base DN"); textFieldBase.setImmediate(false); textFieldBase.setWidth("-1px"); textFieldBase.setHeight("-1px"); mainLayout.addComponent(textFieldBase); // textFieldFilter textFieldFilter = new TextField(); textFieldFilter.setCaption("Filter"); textFieldFilter.setImmediate(false); textFieldFilter.setWidth("-1px"); textFieldFilter.setHeight("-1px"); mainLayout.addComponent(textFieldFilter); // checkBoxShortIds checkBoxShortIds = new CheckBox(); checkBoxShortIds.setCaption("Display short id’s."); checkBoxShortIds.setImmediate(false); checkBoxShortIds.setWidth("-1px"); checkBoxShortIds.setHeight("-1px"); mainLayout.addComponent(checkBoxShortIds); // tableRequiredAttributes tableRequiredAttributes = new Table(); tableRequiredAttributes.setCaption("Attributes Returned"); tableRequiredAttributes.setImmediate(false); tableRequiredAttributes.setWidth("-1px"); tableRequiredAttributes.setHeight("-1px"); mainLayout.addComponent(tableRequiredAttributes); // tableAttributes tableAttributes = new Table(); tableAttributes.setCaption("Parameters - Attributes Needed (i.e. ?)"); tableAttributes.setImmediate(false); tableAttributes.setWidth("-1px"); tableAttributes.setHeight("-1px"); tableAttributes.setInvalidAllowed(false); tableAttributes.setRequired(true); mainLayout.addComponent(tableAttributes); return mainLayout; }
Example 15
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 16
Source File: SQLPIPConfigurationComponent.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); 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 17
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; }
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: 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 20
Source File: WinServerEdit.java From primecloud-controller with GNU General Public License v2.0 | 4 votes |
public AzureDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) { this.instance = instance; this.platform = platform; this.image = image; setHeight(TAB_HEIGHT); setMargin(false, true, false, true); setSpacing(false); sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize")); sizeSelect.setWidth(COMBOBOX_WIDTH); sizeSelect.setNullSelectionAllowed(false); availabilitySetSelect = new ComboBox(ViewProperties.getCaption("field.availabilitySet")); availabilitySetSelect.setWidth(COMBOBOX_WIDTH); availabilitySetSelect.setNullSelectionAllowed(false); locationField = new TextField(ViewProperties.getCaption("field.location")); locationField.setImmediate(true); locationField.setWidth(TEXT_WIDTH); affinityField = new TextField(ViewProperties.getCaption("field.affinityGroup")); affinityField.setImmediate(true); affinityField.setWidth(TEXT_WIDTH); cloudServiceField = new TextField(ViewProperties.getCaption("field.cloudService")); cloudServiceField.setImmediate(true); cloudServiceField.setWidth(TEXT_WIDTH); subnetSelect = new ComboBox(ViewProperties.getCaption("field.subnet")); subnetSelect.setImmediate(true); subnetSelect.setWidth(COMBOBOX_WIDTH); subnetSelect.setNullSelectionAllowed(false); subnetSelect.setItemCaptionPropertyId(CIDR_BLOCK_CAPTION_ID); subnetSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY); storageAccountField = new TextField(ViewProperties.getCaption("field.storageAccount")); storageAccountField.setImmediate(true); storageAccountField.setWidth(COMBOBOX_WIDTH); Label spacer = new Label(" "); spacer.addStyleName("desc-padding-horizontal"); spacer.setHeight("5px"); form.getLayout().addComponent(sizeSelect); form.getLayout().addComponent(availabilitySetSelect); form.getLayout().addComponent(subnetSelect); form.getLayout().addComponent(spacer); HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setMargin(false); form.getLayout().addComponent(layout); addComponent(form); InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus()); if (status != InstanceStatus.STOPPED) { // サーバがStopped以外の場合は、詳細設定タブ自体を変更不可とする form.setEnabled(false); } else { // 停止時は、いくつかの項目を変更不可とする locationField.setEnabled(false); // サーバが作成済みのとき、変更不可 if (StringUtils.isNotEmpty(instance.getAzureInstance().getInstanceName())) { subnetSelect.setEnabled(false); // TODO 可用性セットが設定済みの場合も変更可能かもしれないが、 // 現段階では、APIから可用性セットの情報を取得できないのでサーバー作成済みの場合、変更不可とする availabilitySetSelect.setEnabled(false); } } }