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

The following examples show how to use com.vaadin.ui.VerticalLayout#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: MultiAssignmentsConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Constructor.
 * 
 * @param tenantConfigurationManagement
 *            to read /write tenant-specific configuration properties
 * @param i18n
 *            to obtain localized strings
 */
public MultiAssignmentsConfigurationItem(final TenantConfigurationManagement tenantConfigurationManagement,
        final VaadinMessageSource i18n) {
    super(TenantConfigurationKey.MULTI_ASSIGNMENTS_ENABLED, tenantConfigurationManagement, i18n);
    this.i18n = i18n;

    super.init(MSG_KEY_CHECKBOX);
    isMultiAssignmentsEnabled = isConfigEnabled();

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

    container.addComponent(newLabel(MSG_KEY_NOTICE));

    if (isMultiAssignmentsEnabled) {
        setSettingsVisible(isMultiAssignmentsEnabled);
    }

}
 
Example 2
Source File: PIPImportWindow.java    From XACML with MIT License 6 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");
	
	// upload_1
	upload = new Upload();
	upload.setImmediate(false);
	upload.setWidth("-1px");
	upload.setHeight("-1px");
	mainLayout.addComponent(upload);
	
	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: AttributeStandardSelectorComponent.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(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// comboBoxCategories
	comboBoxCategories = new ComboBox();
	comboBoxCategories.setCaption("Select A Category");
	comboBoxCategories.setImmediate(false);
	comboBoxCategories.setWidth("-1px");
	comboBoxCategories.setHeight("-1px");
	comboBoxCategories.setInvalidAllowed(false);
	comboBoxCategories.setRequired(true);
	mainLayout.addComponent(comboBoxCategories);
	mainLayout.setExpandRatio(comboBoxCategories, 1.0f);
	
	// horizontalLayout_2
	horizontalLayout_2 = buildHorizontalLayout_2();
	mainLayout.addComponent(horizontalLayout_2);
	mainLayout.setExpandRatio(horizontalLayout_2, 1.0f);
	
	return mainLayout;
}
 
Example 5
Source File: AttributeSelectionWindow.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");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	
	// horizontalLayoutAttribute
	horizontalLayoutAttribute = new HorizontalLayout();
	horizontalLayoutAttribute.setImmediate(false);
	horizontalLayoutAttribute.setWidth("-1px");
	horizontalLayoutAttribute.setHeight("-1px");
	horizontalLayoutAttribute.setMargin(false);
	mainLayout.addComponent(horizontalLayoutAttribute);
	mainLayout.setExpandRatio(horizontalLayoutAttribute, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Select");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 6
Source File: PIPParameterComponent.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(false);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// horizontalLayout_1
	horizontalLayout_1 = buildHorizontalLayout_1();
	mainLayout.addComponent(horizontalLayout_1);
	
	// tableParameters
	tableParameters = new Table();
	tableParameters.setCaption("Configuration Parameters");
	tableParameters.setImmediate(false);
	tableParameters.setWidth("-1px");
	tableParameters.setHeight("-1px");
	mainLayout.addComponent(tableParameters);
	
	return mainLayout;
}
 
Example 7
Source File: PDPStatusWindow.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("100.0%");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// table
	table = new Table();
	table.setCaption("Status");
	table.setImmediate(false);
	table.setWidth("100.0%");
	table.setHeight("-1px");
	mainLayout.addComponent(table);
	
	// buttonOK
	buttonOK = new Button();
	buttonOK.setCaption("Ok");
	buttonOK.setImmediate(true);
	buttonOK.setWidth("-1px");
	buttonOK.setHeight("-1px");
	mainLayout.addComponent(buttonOK);
	mainLayout.setComponentAlignment(buttonOK, new Alignment(48));
	
	return mainLayout;
}
 
Example 8
Source File: RegexpEditorComponent.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");
	
	// textFieldExpression
	textFieldExpression = new TextField();
	textFieldExpression.setCaption("Regular Expression");
	textFieldExpression.setImmediate(true);
	textFieldExpression
			.setDescription("Create a regular expression used to constrain attribute values.");
	textFieldExpression.setWidth("-1px");
	textFieldExpression.setHeight("-1px");
	textFieldExpression.setInvalidAllowed(false);
	textFieldExpression.setInputPrompt("eg. [a-zA-Z0-9]");
	mainLayout.addComponent(textFieldExpression);
	mainLayout.setExpandRatio(textFieldExpression, 1.0f);
	
	// panelTester
	panelTester = buildPanelTester();
	mainLayout.addComponent(panelTester);
	mainLayout.setExpandRatio(panelTester, 1.0f);
	
	return mainLayout;
}
 
Example 9
Source File: RangeEditorComponent.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
	// common part: create layout
	verticalLayout_2 = new VerticalLayout();
	verticalLayout_2.setImmediate(false);
	verticalLayout_2.setWidth("100.0%");
	verticalLayout_2.setHeight("100.0%");
	verticalLayout_2.setMargin(false);
	verticalLayout_2.setSpacing(true);
	
	// textFieldTestInput
	textFieldTestInput = new TextField();
	textFieldTestInput.setCaption("Value");
	textFieldTestInput.setImmediate(true);
	textFieldTestInput.setDescription("Enter a value to test against.");
	textFieldTestInput.setWidth("-1px");
	textFieldTestInput.setHeight("-1px");
	textFieldTestInput.setInputPrompt("eg. 50");
	verticalLayout_2.addComponent(textFieldTestInput);
	
	// buttonValidate
	buttonValidate = new Button();
	buttonValidate.setCaption("Test");
	buttonValidate.setImmediate(true);
	buttonValidate
			.setDescription("Click to test if value is within the range.");
	buttonValidate.setWidth("-1px");
	buttonValidate.setHeight("-1px");
	verticalLayout_2.addComponent(buttonValidate);
	verticalLayout_2.setComponentAlignment(buttonValidate,
			new Alignment(48));
	
	return verticalLayout_2;
}
 
Example 10
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 11
Source File: SelectPIPConfigurationWindow.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");
	
	// table
	table = new Table();
	table.setCaption("PIP Configurations");
	table.setImmediate(false);
	table.setWidth("-1px");
	table.setHeight("-1px");
	mainLayout.addComponent(table);
	
	// 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 12
Source File: AttributeDictionary.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");
	
	// horizontalLayoutToolbar
	horizontalLayoutToolbar = buildHorizontalLayoutToolbar();
	mainLayout.addComponent(horizontalLayoutToolbar);
	
	// table
	table = new Table();
	table.setImmediate(false);
	table.setWidth("100.0%");
	table.setHeight("-1px");
	mainLayout.addComponent(table);
	
	return mainLayout;
}
 
Example 13
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 14
Source File: VariableReferenceEditorWindow.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");
	
	// listSelectVariables
	listSelectVariables = new ListSelect();
	listSelectVariables.setCaption("Defined Variables");
	listSelectVariables.setImmediate(false);
	listSelectVariables.setWidth("100.0%");
	listSelectVariables.setHeight("-1px");
	mainLayout.addComponent(listSelectVariables);
	mainLayout.setExpandRatio(listSelectVariables, 1.0f);
	
	// textFieldVariable
	textFieldVariable = new TextField();
	textFieldVariable.setCaption("Variable");
	textFieldVariable.setImmediate(false);
	textFieldVariable.setWidth("-1px");
	textFieldVariable.setHeight("-1px");
	textFieldVariable.setInvalidAllowed(false);
	textFieldVariable.setRequired(true);
	textFieldVariable.setInputPrompt("Eg. \"12345\" or \"myVariable1\"");
	mainLayout.addComponent(textFieldVariable);
	mainLayout.setExpandRatio(textFieldVariable, 1.0f);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save");
	buttonSave.setImmediate(true);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
Example 15
Source File: PIPParamEditorWindow.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");
	
	// 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: 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 17
Source File: FunctionSelectionWindow.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");
	
	// 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: AttributeSimpleCreatorComponent.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 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: ActionAutocleanupConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Constructs the Action Cleanup configuration UI.
 * 
 * @param tenantConfigurationManagement
 *            Configuration service to read /write tenant-specific
 *            configuration settings.
 * @param i18n
 *            The resource bundle to get all localized strings from.
 */
public ActionAutocleanupConfigurationItem(final TenantConfigurationManagement tenantConfigurationManagement,
        final VaadinMessageSource i18n) {
    super(TenantConfigurationKey.ACTION_CLEANUP_ENABLED, tenantConfigurationManagement, i18n);
    super.init("label.configuration.repository.autocleanup.action");

    this.i18n = i18n;
    cleanupEnabled = isConfigEnabled();

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

    final HorizontalLayout row1 = newHorizontalLayout();

    actionStatusCombobox = SPUIComponentProvider.getComboBox(null, "200", null, null, false, "",
            "label.combobox.action.status.options");
    actionStatusCombobox.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_ACTION_CLEANUP_ACTION_TYPES);
    actionStatusCombobox.setNullSelectionAllowed(false);

    for (final ActionStatusOption statusOption : ACTION_STATUS_OPTIONS) {
        actionStatusCombobox.addItem(statusOption);
        actionStatusCombobox.setItemCaption(statusOption, statusOption.getName());
    }
    actionStatusCombobox.setImmediate(true);
    actionStatusCombobox.addValueChangeListener(e -> onActionStatusChanged());
    actionStatusCombobox.select(getActionStatusOption());

    actionExpiryInput = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent();
    actionExpiryInput.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_ACTION_CLEANUP_ACTION_EXPIRY);
    actionExpiryInput.setWidth(55, Unit.PIXELS);
    actionExpiryInput.setNullSettingAllowed(false);
    actionExpiryInput.addTextChangeListener(e -> onActionExpiryChanged());
    actionExpiryInput.addValidator(new ActionExpiryValidator(i18n.getMessage(MSG_KEY_INVALID_EXPIRY)));
    actionExpiryInput.setValue(String.valueOf(getActionExpiry()));

    row1.addComponent(newLabel(MSG_KEY_PREFIX));
    row1.addComponent(actionStatusCombobox);
    row1.addComponent(newLabel(MSG_KEY_BODY));
    row1.addComponent(actionExpiryInput);
    row1.addComponent(newLabel(MSG_KEY_SUFFIX));
    container.addComponent(row1);

    final HorizontalLayout row2 = newHorizontalLayout();
    row2.addComponent(newLabel(MSG_KEY_NOTICE));
    container.addComponent(row2);

    if (isConfigEnabled()) {
        setSettingsVisible(true);
    }

}
 
Example 20
Source File: AttributeValueEditorWindow.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");
	
	// 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;
}