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

The following examples show how to use com.vaadin.ui.HorizontalLayout#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: PolicyWorkspace.java    From XACML with MIT License 6 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutRightToolbar() {
	// common part: create layout
	horizontalLayoutRightToolbar = new HorizontalLayout();
	horizontalLayoutRightToolbar.setImmediate(false);
	horizontalLayoutRightToolbar.setWidth("100.0%");
	horizontalLayoutRightToolbar.setHeight("-1px");
	horizontalLayoutRightToolbar.setMargin(false);
	horizontalLayoutRightToolbar.setSpacing(true);
	
	// buttonRight
	buttonRight = new Button();
	buttonRight.setCaption(">>");
	buttonRight.setImmediate(true);
	buttonRight.setDescription("Restore left panel.");
	buttonRight.setWidth("-1px");
	buttonRight.setHeight("-1px");
	horizontalLayoutRightToolbar.addComponent(buttonRight);
	
	return horizontalLayoutRightToolbar;
}
 
Example 2
Source File: ArtifactDetailsLayout.java    From hawkbit with Eclipse Public License 1.0 6 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout header = new HorizontalLayout();
    header.addStyleName("artifact-details-header");
    header.addStyleName("bordered-layout");
    header.addStyleName("no-border-bottom");
    header.setSpacing(false);
    header.setMargin(false);
    header.setSizeFull();
    header.setHeightUndefined();
    header.setImmediate(true);
    header.addComponents(headerCaptionLayout, maxMinButton);
    header.setComponentAlignment(headerCaptionLayout, Alignment.TOP_LEFT);
    header.setComponentAlignment(maxMinButton, Alignment.TOP_RIGHT);
    header.setExpandRatio(headerCaptionLayout, 1.0F);

    setSizeFull();
    setImmediate(true);
    addStyleName("artifact-table");
    addStyleName("table-layout");
    addComponent(header);
    setComponentAlignment(header, Alignment.MIDDLE_CENTER);
    addComponent(artifactDetailsTable);
    setComponentAlignment(artifactDetailsTable, Alignment.MIDDLE_CENTER);
    setExpandRatio(artifactDetailsTable, 1.0F);
}
 
Example 3
Source File: AttributeSelectionWindow.java    From XACML with MIT License 6 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);
	
	// optionGroupAttribute
	optionGroupAttribute = new OptionGroup();
	optionGroupAttribute.setCaption("Attribute Source");
	optionGroupAttribute.setImmediate(false);
	optionGroupAttribute.setWidth("-1px");
	optionGroupAttribute.setHeight("-1px");
	optionGroupAttribute.setInvalidAllowed(false);
	horizontalLayout_1.addComponent(optionGroupAttribute);
	
	// verticalLayout_2
	verticalLayout_2 = buildVerticalLayout_2();
	horizontalLayout_1.addComponent(verticalLayout_2);
	
	return horizontalLayout_1;
}
 
Example 4
Source File: PolicyWorkspace.java    From XACML with MIT License 5 votes vote down vote up
@AutoGenerated
private HorizontalLayout buildHorizontalLayoutLeftToolbar() {
	// common part: create layout
	horizontalLayoutLeftToolbar = new HorizontalLayout();
	horizontalLayoutLeftToolbar.setImmediate(false);
	horizontalLayoutLeftToolbar.setWidth("100.0%");
	horizontalLayoutLeftToolbar.setHeight("-1px");
	horizontalLayoutLeftToolbar.setMargin(false);
	horizontalLayoutLeftToolbar.setSpacing(true);
	
	// horizontalLayoutLeftToolbarLeft
	horizontalLayoutLeftToolbarLeft = buildHorizontalLayoutLeftToolbarLeft();
	horizontalLayoutLeftToolbar
			.addComponent(horizontalLayoutLeftToolbarLeft);
	
	// buttonLeft
	buttonLeft = new Button();
	buttonLeft.setCaption("<<");
	buttonLeft.setImmediate(true);
	buttonLeft.setDescription("Minimize left panel.");
	buttonLeft.setWidth("-1px");
	buttonLeft.setHeight("-1px");
	horizontalLayoutLeftToolbar.addComponent(buttonLeft);
	horizontalLayoutLeftToolbar.setComponentAlignment(buttonLeft,
			new Alignment(34));
	
	return horizontalLayoutLeftToolbar;
}
 
Example 5
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 6
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 7
Source File: AttributeStandardSelectorComponent.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);
	
	// tableAttributes
	tableAttributes = new Table();
	tableAttributes.setCaption("Standard Attributes");
	tableAttributes.setImmediate(false);
	tableAttributes.setWidth("-1px");
	tableAttributes.setHeight("-1px");
	tableAttributes.setInvalidAllowed(false);
	tableAttributes.setRequired(true);
	horizontalLayout_2.addComponent(tableAttributes);
	
	// tableDatatypes
	tableDatatypes = new Table();
	tableDatatypes.setCaption("Standard Data Types");
	tableDatatypes.setImmediate(false);
	tableDatatypes.setWidth("-1px");
	tableDatatypes.setHeight("-1px");
	tableDatatypes.setInvalidAllowed(false);
	tableDatatypes.setRequired(true);
	horizontalLayout_2.addComponent(tableDatatypes);
	
	return horizontalLayout_2;
}
 
Example 8
Source File: AttributeSimpleCreatorComponent.java    From XACML with MIT License 5 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);
	
	// tableCategory
	tableCategory = new Table();
	tableCategory.setCaption("Choose Category");
	tableCategory.setImmediate(false);
	tableCategory.setWidth("-1px");
	tableCategory.setHeight("-1px");
	tableCategory.setInvalidAllowed(false);
	tableCategory.setRequired(true);
	horizontalLayout_1.addComponent(tableCategory);
	
	// tableDatatype
	tableDatatype = new Table();
	tableDatatype.setCaption("Choose Data Type");
	tableDatatype.setImmediate(false);
	tableDatatype.setWidth("-1px");
	tableDatatype.setHeight("-1px");
	tableDatatype.setInvalidAllowed(false);
	tableDatatype.setRequired(true);
	horizontalLayout_1.addComponent(tableDatatype);
	
	return horizontalLayout_1;
}
 
Example 9
Source File: OaExpressionsEditorComponent.java    From XACML with MIT License 5 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.setWidth("-1px");
	buttonadd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonadd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(true);
	buttonRemove.setDescription("Remove selected expression(s).");
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	
	return horizontalLayout_1;
}
 
Example 10
Source File: UserManagement.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);
	
	// 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 11
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 12
Source File: ObligationAdviceEditorWindow.java    From XACML with MIT License 5 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 Expression");
	buttonAdd.setImmediate(false);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove Expression");
	buttonRemove.setImmediate(false);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	
	// buttonClear
	buttonClear = new Button();
	buttonClear.setCaption("Clear Expressions");
	buttonClear.setImmediate(false);
	buttonClear.setWidth("-1px");
	buttonClear.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClear);
	
	return horizontalLayout_1;
}
 
Example 13
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 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: 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 16
Source File: PIPParameterComponent.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(false);
	buttonAdd.setWidth("-1px");
	buttonAdd.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonAdd);
	
	// buttonRemove
	buttonRemove = new Button();
	buttonRemove.setCaption("Remove");
	buttonRemove.setImmediate(false);
	buttonRemove.setWidth("-1px");
	buttonRemove.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonRemove);
	
	// buttonClone
	buttonClone = new Button();
	buttonClone.setCaption("Clone");
	buttonClone.setImmediate(false);
	buttonClone.setWidth("-1px");
	buttonClone.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClone);
	
	// buttonClear
	buttonClear = new Button();
	buttonClear.setCaption("Clear All");
	buttonClear.setImmediate(false);
	buttonClear.setWidth("-1px");
	buttonClear.setHeight("-1px");
	horizontalLayout_1.addComponent(buttonClear);
	
	return horizontalLayout_1;
}
 
Example 17
Source File: ApplyEditorWindow.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);
	
	// textAreaDescription
	textAreaDescription = new TextArea();
	textAreaDescription.setCaption("Enter A Description");
	textAreaDescription.setImmediate(false);
	textAreaDescription.setWidth("50.0%");
	textAreaDescription.setHeight("-1px");
	horizontalLayout_1.addComponent(textAreaDescription);
	
	// textFieldFilter
	textFieldFilter = new TextField();
	textFieldFilter.setCaption("Filter Function By ID");
	textFieldFilter.setImmediate(false);
	textFieldFilter.setWidth("-1px");
	textFieldFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(textFieldFilter);
	horizontalLayout_1.setComponentAlignment(textFieldFilter,
			new Alignment(9));
	
	// comboBoxDatatypeFilter
	comboBoxDatatypeFilter = new ComboBox();
	comboBoxDatatypeFilter.setCaption("Filter By Data Type");
	comboBoxDatatypeFilter.setImmediate(false);
	comboBoxDatatypeFilter.setWidth("-1px");
	comboBoxDatatypeFilter.setHeight("-1px");
	horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
	horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter,
			new Alignment(9));
	
	// checkBoxFilterIsBag
	checkBoxFilterIsBag = new CheckBox();
	checkBoxFilterIsBag.setCaption("Is Bag Filter");
	checkBoxFilterIsBag.setImmediate(false);
	checkBoxFilterIsBag.setWidth("-1px");
	checkBoxFilterIsBag.setHeight("-1px");
	horizontalLayout_1.addComponent(checkBoxFilterIsBag);
	horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag,
			new Alignment(9));
	
	return horizontalLayout_1;
}
 
Example 18
Source File: AbstractTableHeader.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
private void buildLayout() {
    final HorizontalLayout titleFilterIconsLayout = createHeaderFilterIconLayout();

    titleFilterIconsLayout.addComponents(headerCaption, searchField, searchResetIcon, showFilterButtonLayout);
    titleFilterIconsLayout.setComponentAlignment(headerCaption, Alignment.TOP_LEFT);
    titleFilterIconsLayout.setComponentAlignment(searchField, Alignment.TOP_RIGHT);
    titleFilterIconsLayout.setComponentAlignment(searchResetIcon, Alignment.TOP_RIGHT);
    titleFilterIconsLayout.setComponentAlignment(showFilterButtonLayout, Alignment.TOP_RIGHT);
    if (hasCreatePermission() && isAddNewItemAllowed()) {
        titleFilterIconsLayout.addComponent(addIcon);
        titleFilterIconsLayout.setComponentAlignment(addIcon, Alignment.TOP_RIGHT);
    }
    if (hasCreatePermission() && isBulkUploadAllowed()) {
        titleFilterIconsLayout.addComponent(bulkUploadIcon);
        titleFilterIconsLayout.setComponentAlignment(bulkUploadIcon, Alignment.TOP_RIGHT);
    }
    titleFilterIconsLayout.addComponent(maxMinIcon);
    titleFilterIconsLayout.setComponentAlignment(maxMinIcon, Alignment.TOP_RIGHT);
    titleFilterIconsLayout.setExpandRatio(headerCaption, 0.4F);
    titleFilterIconsLayout.setExpandRatio(searchField, 0.6F);

    addComponent(titleFilterIconsLayout);

    final HorizontalLayout dropHintDropFilterLayout = new HorizontalLayout();
    dropHintDropFilterLayout.addStyleName("filter-drop-hint-layout");
    dropHintDropFilterLayout.setWidth(100, Unit.PERCENTAGE);
    if (isDropFilterRequired()) {
        filterDroppedInfo = new HorizontalLayout();
        filterDroppedInfo.setImmediate(true);
        filterDroppedInfo.setStyleName("target-dist-filter-info");
        filterDroppedInfo.setHeightUndefined();
        filterDroppedInfo.setSizeUndefined();
        displayFilterDropedInfoOnLoad();
        final DragAndDropWrapper dropFilterLayout = new DragAndDropWrapper(filterDroppedInfo);
        dropFilterLayout.setId(getDropFilterId());
        dropFilterLayout.setDropHandler(getDropFilterHandler());

        dropHintDropFilterLayout.addComponent(dropFilterLayout);
        dropHintDropFilterLayout.setComponentAlignment(dropFilterLayout, Alignment.TOP_CENTER);
        dropHintDropFilterLayout.setExpandRatio(dropFilterLayout, 1.0F);
    }
    addComponent(dropHintDropFilterLayout);
    setComponentAlignment(dropHintDropFilterLayout, Alignment.TOP_CENTER);
    addStyleName("bordered-layout");
    addStyleName("no-border-bottom");
}
 
Example 19
Source File: XacmlAdminConsole.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("100.0%");
	horizontalLayout_1.setHeight("40px");
	horizontalLayout_1.setMargin(false);
	
	// embedded_1
	embedded_1 = new Embedded();
	embedded_1.setImmediate(false);
	embedded_1.setWidth("30px");
	embedded_1.setHeight("30px");
	embedded_1.setSource(new ThemeResource("img/att.png"));
	embedded_1.setType(1);
	embedded_1.setMimeType("image/png");
	horizontalLayout_1.addComponent(embedded_1);
	horizontalLayout_1.setComponentAlignment(embedded_1, new Alignment(33));
	
	// caption
	caption = new Label();
	caption.setImmediate(false);
	caption.setWidth("-1px");
	caption.setHeight("-1px");
	caption.setValue("AT&T Policy Engine Admin Console");
	horizontalLayout_1.addComponent(caption);
	horizontalLayout_1.setExpandRatio(caption, 1.0f);
	horizontalLayout_1.setComponentAlignment(caption, new Alignment(33));
	
	// labelWelcome
	labelWelcome = new Label();
	labelWelcome.setImmediate(false);
	labelWelcome.setWidth("-1px");
	labelWelcome.setHeight("40px");
	labelWelcome.setValue("Label");
	horizontalLayout_1.addComponent(labelWelcome);
	horizontalLayout_1.setComponentAlignment(labelWelcome,
			new Alignment(34));
	
	return horizontalLayout_1;
}
 
Example 20
Source File: DefaultDistributionSetTypeLayout.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
DefaultDistributionSetTypeLayout(final SystemManagement systemManagement,
        final DistributionSetTypeManagement distributionSetTypeManagement, final VaadinMessageSource i18n,
        final SpPermissionChecker permChecker) {
    this.systemManagement = systemManagement;
    combobox = SPUIComponentProvider.getComboBox(null, "330", null, null, false, "", "label.combobox.tag");
    changeIcon = new Label();

    if (!permChecker.hasReadRepositoryPermission()) {
        return;
    }

    final Panel rootPanel = new Panel();
    rootPanel.setSizeFull();
    rootPanel.addStyleName("config-panel");
    final VerticalLayout vlayout = new VerticalLayout();
    vlayout.setMargin(true);
    vlayout.setSizeFull();

    final Label header = new Label(i18n.getMessage("configuration.defaultdistributionset.title"));
    header.addStyleName("config-panel-header");
    vlayout.addComponent(header);

    final DistributionSetType currentDistributionSetType = getCurrentDistributionSetType();
    currentDefaultDisSetType = currentDistributionSetType.getId();

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

    final Label configurationLabel = new LabelBuilder()
            .name(i18n.getMessage("configuration.defaultdistributionset.select.label")).buildLabel();
    hlayout.addComponent(configurationLabel);

    final Iterable<DistributionSetType> distributionSetTypeCollection = distributionSetTypeManagement
            .findAll(PageRequest.of(0, 100));

    combobox.setId(UIComponentIdProvider.SYSTEM_CONFIGURATION_DEFAULTDIS_COMBOBOX);
    combobox.setNullSelectionAllowed(false);
    for (final DistributionSetType distributionSetType : distributionSetTypeCollection) {
        combobox.addItem(distributionSetType.getId());
        combobox.setItemCaption(distributionSetType.getId(),
                distributionSetType.getKey() + " (" + distributionSetType.getName() + ")");

        if (distributionSetType.getId().equals(currentDistributionSetType.getId())) {
            combobox.select(distributionSetType.getId());
        }
    }
    combobox.setImmediate(true);
    combobox.addValueChangeListener(event -> selectDistributionSetValue());
    hlayout.addComponent(combobox);

    changeIcon.setIcon(FontAwesome.CHECK);
    hlayout.addComponent(changeIcon);
    changeIcon.setVisible(false);

    vlayout.addComponent(hlayout);
    rootPanel.setContent(vlayout);
    setCompositionRoot(rootPanel);
}