Java Code Examples for com.vaadin.ui.Button#setImmediate()

The following examples show how to use com.vaadin.ui.Button#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: DistributionTable.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private Button createPinBtn(final Object itemId) {

        final Item item = getContainerDataSource().getItem(itemId);
        final String name = (String) item.getItemProperty(SPUILabelDefinitions.VAR_NAME).getValue();

        final String version = (String) item.getItemProperty(SPUILabelDefinitions.VAR_VERSION).getValue();
        final DistributionSetIdName distributionSetIdName = new DistributionSetIdName((Long) itemId, name, version);

        final Button pinBtn = new Button();
        pinBtn.setIcon(FontAwesome.THUMB_TACK);
        pinBtn.setHeightUndefined();
        pinBtn.addStyleName(getPinStyle());
        pinBtn.setData(distributionSetIdName);
        pinBtn.setId(getPinButtonId(name, version));
        pinBtn.setImmediate(true);
        pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_DISTRIBUTION_SET_PIN));
        return pinBtn;
    }
 
Example 2
Source File: SelectPDPGroupWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// 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 3
Source File: VariableDefinitionEditorWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldID
	textFieldID = new TextField();
	textFieldID.setCaption("Variable ID");
	textFieldID.setImmediate(false);
	textFieldID.setWidth("-1px");
	textFieldID.setHeight("-1px");
	textFieldID.setInvalidAllowed(false);
	textFieldID.setRequired(true);
	textFieldID.setNullRepresentation("");
	mainLayout.addComponent(textFieldID);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save and Continue");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 4
Source File: GitSynchronizeWindow.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// 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 5
Source File: PDPManagement.java    From XACML with MIT License 5 votes vote down vote up
@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);
	
	// buttonCreate
	buttonCreate = new Button();
	buttonCreate.setCaption("Create Group");
	buttonCreate.setImmediate(false);
	buttonCreate.setWidth("-1px");
	buttonCreate.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonCreate);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove Group");
	buttonRemove.setImmediate(false);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	
	return horizontalLayoutToolbar;
}
 
Example 6
Source File: AttributeDictionarySelectorComponent.java    From XACML with MIT License 5 votes vote down vote up
@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);
	
	// comboBoxCategoryFilter
	comboBoxCategoryFilter = new ComboBox();
	comboBoxCategoryFilter.setCaption("Filter Category");
	comboBoxCategoryFilter.setImmediate(false);
	comboBoxCategoryFilter.setWidth("-1px");
	comboBoxCategoryFilter.setHeight("-1px");
	horizontalLayout_2.addComponent(comboBoxCategoryFilter);
	horizontalLayout_2.setExpandRatio(comboBoxCategoryFilter, 1.0f);
	
	// buttonNewAttribute
	buttonNewAttribute = new Button();
	buttonNewAttribute.setCaption("New Attribute");
	buttonNewAttribute.setImmediate(true);
	buttonNewAttribute
			.setDescription("Click to create a new attribute in the dictionary.");
	buttonNewAttribute.setWidth("-1px");
	buttonNewAttribute.setHeight("-1px");
	horizontalLayout_2.addComponent(buttonNewAttribute);
	horizontalLayout_2.setComponentAlignment(buttonNewAttribute,
			new Alignment(10));
	
	return horizontalLayout_2;
}
 
Example 7
Source File: PolicyWorkspace.java    From XACML with MIT License 5 votes vote down vote up
@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 8
Source File: GatewaySecurityTokenAuthenticationConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
public GatewaySecurityTokenAuthenticationConfigurationItem(
        final TenantConfigurationManagement tenantConfigurationManagement, final VaadinMessageSource i18n,
        final SecurityTokenGenerator securityTokenGenerator) {
    super(TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, tenantConfigurationManagement,
            i18n);
    this.securityTokenGenerator = securityTokenGenerator;

    super.init("label.configuration.auth.gatewaytoken");

    configurationEnabled = isConfigEnabled();

    detailLayout = new VerticalLayout();
    detailLayout.setImmediate(true);

    final Button gatewaytokenBtn = SPUIComponentProvider.getButton(null, i18n.getMessage("configuration.button.regenerateKey"), "",
            ValoTheme.BUTTON_TINY + " " + "redicon", true, null, SPUIButtonStyleSmall.class);
    gatewaytokenBtn.setImmediate(true);
    gatewaytokenBtn.setIcon(FontAwesome.REFRESH);
    gatewaytokenBtn.addClickListener(event -> generateGatewayToken());

    gatewayTokenkeyLabel = new LabelBuilder().id("gatewaysecuritytokenkey").name("").buildLabel();
    gatewayTokenkeyLabel.addStyleName("gateway-token-label");
    gatewayTokenkeyLabel.setImmediate(true);

    final HorizontalLayout keyGenerationLayout = new HorizontalLayout();
    keyGenerationLayout.setSpacing(true);
    keyGenerationLayout.setImmediate(true);

    keyGenerationLayout.addComponent(gatewayTokenkeyLabel);
    keyGenerationLayout.addComponent(gatewaytokenBtn);

    detailLayout.addComponent(keyGenerationLayout);

    if (isConfigEnabled()) {
        gatewayTokenkeyLabel.setValue(getSecurityTokenKey());
        setDetailVisible(true);
    }
}
 
Example 9
Source File: PolicySetEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 10
Source File: AttributeAssignmentExpressionEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldAttributeID
	textFieldAttributeID = new TextField();
	textFieldAttributeID.setCaption("Attribute Assignment ID");
	textFieldAttributeID.setImmediate(false);
	textFieldAttributeID.setWidth("-1px");
	textFieldAttributeID.setHeight("-1px");
	textFieldAttributeID.setInvalidAllowed(false);
	textFieldAttributeID.setRequired(true);
	mainLayout.addComponent(textFieldAttributeID);
	
	// textFieldIssuer
	textFieldIssuer = new TextField();
	textFieldIssuer.setCaption("Issuer (Optional)");
	textFieldIssuer.setImmediate(false);
	textFieldIssuer.setWidth("-1px");
	textFieldIssuer.setHeight("-1px");
	textFieldIssuer.setNullSettingAllowed(true);
	mainLayout.addComponent(textFieldIssuer);
	
	// tableCategories
	tableCategories = new Table();
	tableCategories.setCaption("Category (Optional)");
	tableCategories.setImmediate(false);
	tableCategories.setWidth("100.0%");
	tableCategories.setHeight("-1px");
	mainLayout.addComponent(tableCategories);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 11
Source File: ObligationEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldObligationID
	textFieldObligationID = new TextField();
	textFieldObligationID.setCaption("Obligation ID");
	textFieldObligationID.setImmediate(false);
	textFieldObligationID.setWidth("-1px");
	textFieldObligationID.setHeight("-1px");
	textFieldObligationID.setInvalidAllowed(false);
	textFieldObligationID.setRequired(true);
	textFieldObligationID.setInputPrompt("Eg. urn:com:foo:obligation:sample");
	mainLayout.addComponent(textFieldObligationID);
	
	// optionGroupFullfillOn
	optionGroupFullfillOn = new OptionGroup();
	optionGroupFullfillOn.setCaption("Fulfill On");
	optionGroupFullfillOn.setImmediate(false);
	optionGroupFullfillOn.setWidth("-1px");
	optionGroupFullfillOn.setHeight("-1px");
	optionGroupFullfillOn.setInvalidAllowed(false);
	optionGroupFullfillOn.setRequired(true);
	mainLayout.addComponent(optionGroupFullfillOn);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 12
Source File: EnumerationEditorComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// buttonAdd
	buttonAdd = new Button();
	buttonAdd.setCaption("Add");
	buttonAdd.setImmediate(true);
	buttonAdd.setDescription("Add a new enumeration value.");
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	horizontalLayout_1.setComponentAlignment(buttonAdd, new Alignment(9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected enumeration value.");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	horizontalLayout_1.setComponentAlignment(buttonRemove,
			new Alignment(10));
	
	// buttonClearAll
	buttonClearAll = new Button();
	buttonClearAll.setCaption("Clear All");
	buttonClearAll.setImmediate(false);
	buttonClearAll.setDescription("Clears all the values out.");
	buttonClearAll.setWidth("-1px");
	buttonClearAll.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClearAll);
	
	return horizontalLayout_1;
}
 
Example 13
Source File: RuleEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelRuleID
	labelRuleID = new Label();
	labelRuleID.setCaption("Rule ID");
	labelRuleID.setImmediate(false);
	labelRuleID.setWidth("100.0%");
	labelRuleID.setHeight("-1px");
	labelRuleID.setValue("Label");
	mainLayout.addComponent(labelRuleID);
	mainLayout.setExpandRatio(labelRuleID, 1.0f);
	
	// optionGroupEffect
	optionGroupEffect = new OptionGroup();
	optionGroupEffect.setCaption("Choose the effect.");
	optionGroupEffect.setImmediate(false);
	optionGroupEffect.setWidth("-1px");
	optionGroupEffect.setHeight("-1px");
	optionGroupEffect.setInvalidAllowed(false);
	optionGroupEffect.setRequired(true);
	mainLayout.addComponent(optionGroupEffect);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter a description for the Rule.");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	textAreaDescription.setNullSettingAllowed(true);
	textAreaDescription.setNullRepresentation("");
	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 vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
	// common part: create layout
	horizontalLayout_1 = new HorizontalLayout();
	horizontalLayout_1.setImmediate(false);
	horizontalLayout_1.setWidth("-1px");
	horizontalLayout_1.setHeight("-1px");
	horizontalLayout_1.setMargin(false);
	horizontalLayout_1.setSpacing(true);
	
	// 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: LDAPPIPConfigurationComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// 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 16
Source File: AttributeDictionary.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutToolbar() {
	// common part: create layout
	horizontalLayoutToolbar = new HorizontalLayout();
	horizontalLayoutToolbar.setImmediate(false);
	horizontalLayoutToolbar.setWidth("-1px");
	horizontalLayoutToolbar.setHeight("-1px");
	horizontalLayoutToolbar.setMargin(false);
	horizontalLayoutToolbar.setSpacing(true);
	
	// buttonNew
	buttonNew = new Button();
	buttonNew.setCaption("New");
	buttonNew.setImmediate(true);
	buttonNew.setDescription("Create a new attribute");
	buttonNew.setWidth("70px");
	buttonNew.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonNew);
	horizontalLayoutToolbar.setComponentAlignment(buttonNew, new Alignment(
			9));
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove the selected attribute(s)");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonRemove);
	horizontalLayoutToolbar.setComponentAlignment(buttonRemove,
			new Alignment(9));
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(true);
	buttonClone.setDescription("Clone an attribute.");
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(buttonClone);
	horizontalLayoutToolbar.setComponentAlignment(buttonClone,
			new Alignment(9));
	
	// comboBoxFilterCategory
	comboBoxFilterCategory = new ComboBox();
	comboBoxFilterCategory.setCaption("Filter By Category");
	comboBoxFilterCategory.setImmediate(false);
	comboBoxFilterCategory.setWidth("-1px");
	comboBoxFilterCategory.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterCategory);
	
	// comboBoxFilterDatatype
	comboBoxFilterDatatype = new ComboBox();
	comboBoxFilterDatatype.setCaption("Filter By Data Type");
	comboBoxFilterDatatype.setImmediate(false);
	comboBoxFilterDatatype.setWidth("-1px");
	comboBoxFilterDatatype.setHeight("-1px");
	horizontalLayoutToolbar.addComponent(comboBoxFilterDatatype);
	
	return horizontalLayoutToolbar;
}
 
Example 17
Source File: EditPDPGroupWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("100.0%");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textName
	textName = new TextField();
	textName.setCaption("Group Name");
	textName.setImmediate(false);
	textName.setWidth("-1px");
	textName.setHeight("-1px");
	textName.setRequired(true);
	mainLayout.addComponent(textName);
	
	// textDescription
	textDescription = new TextArea();
	textDescription.setCaption("Group Description");
	textDescription.setImmediate(false);
	textDescription.setWidth("100.0%");
	textDescription.setHeight("-1px");
	textDescription.setNullSettingAllowed(true);
	mainLayout.addComponent(textDescription);
	mainLayout.setExpandRatio(textDescription, 1.0f);
	
	// tablePolicies
	tablePolicies = new Table();
	tablePolicies.setCaption("Policies");
	tablePolicies.setImmediate(false);
	tablePolicies.setWidth("-1px");
	tablePolicies.setHeight("-1px");
	mainLayout.addComponent(tablePolicies);
	mainLayout.setExpandRatio(tablePolicies, 1.0f);
	
	// tablePIP
	tablePIP = new Table();
	tablePIP.setCaption("PIP Configurations");
	tablePIP.setImmediate(false);
	tablePIP.setWidth("-1px");
	tablePIP.setHeight("-1px");
	mainLayout.addComponent(tablePIP);
	mainLayout.setExpandRatio(tablePIP, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 18
Source File: SQLPIPConfigurationComponent.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxConnectionType
	comboBoxConnectionType = new ComboBox();
	comboBoxConnectionType.setCaption("Type of SQL Connection");
	comboBoxConnectionType.setImmediate(false);
	comboBoxConnectionType.setWidth("-1px");
	comboBoxConnectionType.setHeight("-1px");
	mainLayout.addComponent(comboBoxConnectionType);
	
	// textFieldDataSource
	textFieldDataSource = new TextField();
	textFieldDataSource.setCaption("Data Source");
	textFieldDataSource.setImmediate(false);
	textFieldDataSource.setWidth("-1px");
	textFieldDataSource.setHeight("-1px");
	mainLayout.addComponent(textFieldDataSource);
	mainLayout.setExpandRatio(textFieldDataSource, 1.0f);
	
	// comboBoxSQLDriver
	comboBoxSQLDriver = new ComboBox();
	comboBoxSQLDriver.setCaption("JDBC Driver");
	comboBoxSQLDriver.setImmediate(false);
	comboBoxSQLDriver.setWidth("-1px");
	comboBoxSQLDriver.setHeight("-1px");
	mainLayout.addComponent(comboBoxSQLDriver);
	mainLayout.setExpandRatio(comboBoxSQLDriver, 1.0f);
	
	// textFieldConnectionURL
	textFieldConnectionURL = new TextField();
	textFieldConnectionURL.setCaption("Connection URL");
	textFieldConnectionURL.setImmediate(false);
	textFieldConnectionURL.setWidth("-1px");
	textFieldConnectionURL.setHeight("-1px");
	mainLayout.addComponent(textFieldConnectionURL);
	mainLayout.setExpandRatio(textFieldConnectionURL, 1.0f);
	
	// textFieldUser
	textFieldUser = new TextField();
	textFieldUser.setCaption("User");
	textFieldUser.setImmediate(false);
	textFieldUser.setWidth("-1px");
	textFieldUser.setHeight("-1px");
	mainLayout.addComponent(textFieldUser);
	mainLayout.setExpandRatio(textFieldUser, 1.0f);
	
	// textFieldPassword
	textFieldPassword = new PasswordField();
	textFieldPassword.setCaption("Password");
	textFieldPassword.setImmediate(false);
	textFieldPassword.setWidth("-1px");
	textFieldPassword.setHeight("-1px");
	mainLayout.addComponent(textFieldPassword);
	mainLayout.setExpandRatio(textFieldPassword, 1.0f);
	
	// buttonTest
	buttonTest = new Button();
	buttonTest.setCaption("Test Connection");
	buttonTest.setImmediate(true);
	buttonTest.setWidth("-1px");
	buttonTest.setHeight("-1px");
	mainLayout.addComponent(buttonTest);
	mainLayout.setComponentAlignment(buttonTest, new Alignment(48));
	
	return mainLayout;
}
 
Example 19
Source File: PolicyEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// labelID
	labelID = new Label();
	labelID.setCaption("Policy Set ID");
	labelID.setImmediate(false);
	labelID.setWidth("100.0%");
	labelID.setHeight("-1px");
	labelID.setValue("Label");
	mainLayout.addComponent(labelID);
	
	// textFieldVersion
	textFieldVersion = new TextField();
	textFieldVersion.setCaption("Version");
	textFieldVersion.setImmediate(false);
	textFieldVersion
			.setDescription("The format is numbers only separated by decimal point.");
	textFieldVersion.setWidth("-1px");
	textFieldVersion.setHeight("-1px");
	textFieldVersion.setInvalidAllowed(false);
	textFieldVersion.setRequired(true);
	textFieldVersion.setInputPrompt("Eg. 1 or 1.0 or 1.0.0 etc.");
	mainLayout.addComponent(textFieldVersion);
	
	// listSelectAlgorithm
	listSelectAlgorithm = new ListSelect();
	listSelectAlgorithm.setCaption("Policy Combining Algorithm");
	listSelectAlgorithm.setImmediate(false);
	listSelectAlgorithm.setWidth("100.0%");
	listSelectAlgorithm.setHeight("-1px");
	listSelectAlgorithm.setInvalidAllowed(false);
	listSelectAlgorithm.setRequired(true);
	mainLayout.addComponent(listSelectAlgorithm);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("100.0%");
	textAreaDescription.setHeight("-1px");
	mainLayout.addComponent(textAreaDescription);
	mainLayout.setExpandRatio(textAreaDescription, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 20
Source File: PolicyNameEditorWindow.java    From XACML with MIT License 4 votes vote down vote up
@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;
}