Java Code Examples for com.vaadin.ui.Button#setCaption()
The following examples show how to use
com.vaadin.ui.Button#setCaption() .
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: AbstractFilterButtons.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private Button createFilterButton(final Long id, final String name, final String description, final String color, final Object itemId) { /** * No icon displayed for "NO TAG" button. */ final Button button = SPUIComponentProvider.getButton("", name, description, "", false, null, SPUITagButtonStyle.class); button.setId(createButtonId(name)); button.setCaptionAsHtml(true); if (id != null) { // Use button.getCaption() since the caption name is modified // according to the length // available in UI. button.setCaption(prepareFilterButtonCaption(button.getCaption(), color)); } if (!StringUtils.isEmpty(description)) { button.setDescription(description); } else { button.setDescription(name); } button.setData(id == null ? SPUIDefinitions.NO_TAG_BUTTON_ID : itemId); return button; }
Example 2
Source File: ServiceTable.java From primecloud-controller with GNU General Public License v2.0 | 6 votes |
private Button createLoadBalancerButton(final LoadBalancerDto loadBalancer) { Button button = new Button(); button.setCaption(loadBalancer.getLoadBalancer().getLoadBalancerName()); button.setIcon(Icons.LOADBALANCER_TAB.resource()); button.setData(loadBalancer); button.addStyleName("borderless"); button.addStyleName("loadbalancer-button"); button.addListener(new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { // ロードバランサを選択 sender.loadBalancerPanel.loadBalancerTable.select(loadBalancer); // ロードバランサタブに移動 sender.tab.setSelectedTab(sender.loadBalancerPanel); } }); return button; }
Example 3
Source File: PolicyWorkspace.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayoutLeftToolbarLeft() { // common part: create layout horizontalLayoutLeftToolbarLeft = new HorizontalLayout(); horizontalLayoutLeftToolbarLeft.setImmediate(false); horizontalLayoutLeftToolbarLeft.setWidth("-1px"); horizontalLayoutLeftToolbarLeft.setHeight("-1px"); horizontalLayoutLeftToolbarLeft.setMargin(false); horizontalLayoutLeftToolbarLeft.setSpacing(true); // buttonSynchronize buttonSynchronize = new Button(); buttonSynchronize.setCaption("Synchronize Repository"); buttonSynchronize.setImmediate(true); buttonSynchronize .setDescription("Synchronize local repository with main branch."); buttonSynchronize.setWidth("-1px"); buttonSynchronize.setHeight("-1px"); horizontalLayoutLeftToolbarLeft.addComponent(buttonSynchronize); // buttonExport buttonExport = new Button(); buttonExport.setCaption("Export Workspace"); buttonExport.setImmediate(true); buttonExport.setDescription("Export your workspace to your local drive."); buttonExport.setWidth("-1px"); buttonExport.setHeight("-1px"); horizontalLayoutLeftToolbarLeft.addComponent(buttonExport); return horizontalLayoutLeftToolbarLeft; }
Example 4
Source File: WindowBreadCrumbs.java From cuba with Apache License 2.0 | 5 votes |
public void update() { boolean isTestMode = ui.isTestMode(); linksLayout.removeAllComponents(); for (Iterator<Window> it = windows.iterator(); it.hasNext();) { Window window = it.next(); Button button = new NavigationButton(window); button.setCaption(StringUtils.trimToEmpty(window.getCaption())); button.addClickListener(this::navigationButtonClicked); button.setSizeUndefined(); button.setStyleName(ValoTheme.BUTTON_LINK); button.setTabIndex(-1); if (isTestMode) { button.setCubaId("breadCrubms_Button_" + window.getId()); } if (ui.isPerformanceTestMode()) { button.setId(ui.getTestIdManager().getTestId("breadCrubms_Button_" + window.getId())); } if (it.hasNext()) { linksLayout.addComponent(button); Label separatorLab = new Label(" > "); separatorLab.setStyleName("c-breadcrumbs-separator"); separatorLab.setSizeUndefined(); separatorLab.setContentMode(ContentMode.HTML); linksLayout.addComponent(separatorLab); } else { Label captionLabel = new Label(window.getCaption()); captionLabel.setStyleName("c-breadcrumbs-win-caption"); captionLabel.setSizeUndefined(); linksLayout.addComponent(captionLabel); } } }
Example 5
Source File: SelectWorkspacePoliciesWindow.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"); // treeWorkspace treeWorkspace = new TreeTable(); treeWorkspace.setCaption("Select Policy(s) for PDP Group"); treeWorkspace.setImmediate(true); treeWorkspace.setWidth("100.0%"); treeWorkspace.setHeight("-1px"); mainLayout.addComponent(treeWorkspace); // 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 6
Source File: TagListField.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
private Button createButton(final String tagName, final String tagColor) { final Button button = SPUIComponentProvider.getButton(UIComponentIdProvider.ASSIGNED_TAG_ID_PREFIX + tagName, tagName, i18n.getMessage(UIMessageIdProvider.TOOLTIP_CLICK_TO_REMOVE), null, false, null, SPUITagButtonStyle.class); button.addClickListener(e -> removeTagAssignment(tagName)); button.addStyleName(SPUIStyleDefinitions.TAG_BUTTON_WITH_BACKGROUND); button.addStyleName(SPUIDefinitions.TEXT_STYLE + " " + SPUIStyleDefinitions.DETAILS_LAYOUT_STYLE); button.setEnabled(!readOnlyMode); button.setCaption("<span style=\" color:" + tagColor + " !important;\">" + FontAwesome.CIRCLE.getHtml() + "</span>" + " " + tagName.concat(" ×")); button.setCaptionAsHtml(true); return button; }
Example 7
Source File: UserManagement.java From XACML with MIT License | 5 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayoutToolbar() { // common part: create layout horizontalLayoutToolbar = new HorizontalLayout(); horizontalLayoutToolbar.setImmediate(false); horizontalLayoutToolbar.setWidth("-1px"); horizontalLayoutToolbar.setHeight("-1px"); horizontalLayoutToolbar.setMargin(true); horizontalLayoutToolbar.setSpacing(true); // buttonAdd buttonAdd = new Button(); buttonAdd.setCaption("Add User"); buttonAdd.setImmediate(false); buttonAdd.setWidth("-1px"); buttonAdd.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonAdd); // buttonRemove buttonRemove = new Button(); buttonRemove.setCaption("Remove User"); buttonRemove.setImmediate(false); buttonRemove.setWidth("-1px"); buttonRemove.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonRemove); return horizontalLayoutToolbar; }
Example 8
Source File: RenamePolicyFileWindow.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"); // textFieldFilename textFieldFilename = new TextField(); textFieldFilename.setCaption("Policy File Name"); textFieldFilename.setImmediate(false); textFieldFilename.setWidth("-1px"); textFieldFilename.setHeight("-1px"); mainLayout.addComponent(textFieldFilename); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(false); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); mainLayout.addComponent(buttonSave); mainLayout.setComponentAlignment(buttonSave, new Alignment(24)); return mainLayout; }
Example 9
Source File: GitSynchronizeWindow.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"); // textAreaResults textAreaResults = new TextArea(); textAreaResults.setCaption("Synch Results"); textAreaResults.setImmediate(false); textAreaResults.setWidth("462px"); textAreaResults.setHeight("222px"); mainLayout.addComponent(textAreaResults); // buttonSynchronize buttonSynchronize = new Button(); buttonSynchronize.setCaption("Synchronize"); buttonSynchronize.setImmediate(true); buttonSynchronize.setWidth("-1px"); buttonSynchronize.setHeight("-1px"); mainLayout.addComponent(buttonSynchronize); mainLayout.setComponentAlignment(buttonSynchronize, new Alignment(24)); return mainLayout; }
Example 10
Source File: SelectPDPGroupWindow.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"); // listSelectPDPGroup listSelectPDPGroup = new ListSelect(); listSelectPDPGroup.setImmediate(false); listSelectPDPGroup.setWidth("-1px"); listSelectPDPGroup.setHeight("-1px"); listSelectPDPGroup.setInvalidAllowed(false); listSelectPDPGroup.setRequired(true); mainLayout.addComponent(listSelectPDPGroup); mainLayout.setExpandRatio(listSelectPDPGroup, 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: PolicyEditor.java From XACML with MIT License | 4 votes |
@AutoGenerated private HorizontalLayout buildHorizontalLayoutToolbar() { // common part: create layout horizontalLayoutToolbar = new HorizontalLayout(); horizontalLayoutToolbar.setImmediate(false); horizontalLayoutToolbar.setWidth("-1px"); horizontalLayoutToolbar.setHeight("-1px"); horizontalLayoutToolbar.setMargin(true); horizontalLayoutToolbar.setSpacing(true); // checkBoxReadOnly checkBoxReadOnly = new CheckBox(); checkBoxReadOnly.setCaption("Read Only"); checkBoxReadOnly.setImmediate(false); checkBoxReadOnly .setDescription("Check this to turn-off policy editing."); checkBoxReadOnly.setWidth("-1px"); checkBoxReadOnly.setHeight("-1px"); horizontalLayoutToolbar.addComponent(checkBoxReadOnly); // checkBoxAutoSave checkBoxAutoSave = new CheckBox(); checkBoxAutoSave.setCaption("Auto Save"); checkBoxAutoSave.setImmediate(false); checkBoxAutoSave .setDescription("Check this to turn-on automatic saving of policy when a change occurs."); checkBoxAutoSave.setWidth("-1px"); checkBoxAutoSave.setHeight("-1px"); horizontalLayoutToolbar.addComponent(checkBoxAutoSave); // buttonSave buttonSave = new Button(); buttonSave.setCaption("Save"); buttonSave.setImmediate(true); buttonSave.setDescription("Click to save the policy."); buttonSave.setWidth("-1px"); buttonSave.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonSave); // buttonViewXML buttonViewXML = new Button(); buttonViewXML.setCaption("View XML"); buttonViewXML.setImmediate(true); buttonViewXML.setWidth("-1px"); buttonViewXML.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonViewXML); // buttonExport buttonExport = new Button(); buttonExport.setCaption("Export Policy"); buttonExport.setImmediate(false); buttonExport.setWidth("-1px"); buttonExport.setHeight("-1px"); horizontalLayoutToolbar.addComponent(buttonExport); return horizontalLayoutToolbar; }
Example 12
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 13
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 14
Source File: ExpressionBuilderComponent.java From XACML with MIT License | 4 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); // buttonAddExpression buttonAddExpression = new Button(); buttonAddExpression.setCaption("Add Expression"); buttonAddExpression.setImmediate(true); buttonAddExpression.setWidth("-1px"); buttonAddExpression.setHeight("-1px"); horizontalLayout_1.addComponent(buttonAddExpression); // buttonDeleteExpression buttonDeleteExpression = new Button(); buttonDeleteExpression.setCaption("Delete Expression"); buttonDeleteExpression.setImmediate(true); buttonDeleteExpression.setWidth("-1px"); buttonDeleteExpression.setHeight("-1px"); horizontalLayout_1.addComponent(buttonDeleteExpression); // buttonClearAll buttonClearAll = new Button(); buttonClearAll.setCaption("Clear All"); buttonClearAll.setImmediate(true); buttonClearAll.setDescription("Clears all the expressions."); buttonClearAll.setWidth("-1px"); buttonClearAll.setHeight("-1px"); horizontalLayout_1.addComponent(buttonClearAll); // checkBoxShortName checkBoxShortName = new CheckBox(); checkBoxShortName.setCaption("Display Short XACML ID's"); checkBoxShortName.setImmediate(false); checkBoxShortName .setDescription("If checked, the right-most string of the function and datatype URI's will only be displayed."); checkBoxShortName.setWidth("-1px"); checkBoxShortName.setHeight("-1px"); horizontalLayout_1.addComponent(checkBoxShortName); return horizontalLayout_1; }
Example 15
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 16
Source File: GitPushWindow.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"); // textAreaComments textAreaComments = new TextArea(); textAreaComments.setCaption("Add Comments"); textAreaComments.setImmediate(false); textAreaComments .setDescription("Enter comments that reflect the changes you have made to the repository domains and/or policy files."); textAreaComments.setWidth("400px"); textAreaComments.setHeight("-1px"); textAreaComments.setInvalidAllowed(false); textAreaComments.setRequired(true); textAreaComments .setInputPrompt("Eg. Add new rule for employees in marketing department."); mainLayout.addComponent(textAreaComments); // tableChanges tableChanges = new Table(); tableChanges.setCaption("Changes To Be Pushed"); tableChanges.setImmediate(false); tableChanges.setWidth("100.0%"); tableChanges.setHeight("-1px"); mainLayout.addComponent(tableChanges); mainLayout.setExpandRatio(tableChanges, 1.0f); // buttonPush buttonPush = new Button(); buttonPush.setCaption("Push Changes"); buttonPush.setImmediate(true); buttonPush.setWidth("-1px"); buttonPush.setHeight("-1px"); mainLayout.addComponent(buttonPush); mainLayout.setComponentAlignment(buttonPush, new Alignment(48)); return mainLayout; }
Example 17
Source File: FunctionSelectionWindow.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"); // textFieldFilter textFieldFilter = new TextField(); textFieldFilter.setCaption("Filter"); textFieldFilter.setImmediate(false); textFieldFilter.setWidth("-1px"); textFieldFilter.setHeight("-1px"); mainLayout.addComponent(textFieldFilter); // tableFunctions tableFunctions = new Table(); tableFunctions.setImmediate(false); tableFunctions.setDescription("Functions To Select From"); tableFunctions.setWidth("100.0%"); tableFunctions.setHeight("-1px"); mainLayout.addComponent(tableFunctions); mainLayout.setExpandRatio(tableFunctions, 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: 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 19
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 20
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; }