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

The following examples show how to use com.vaadin.ui.HorizontalLayout#setHeightUndefined() . 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: 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 2
Source File: ConfirmDialogExt.java    From mycollab with GNU Affero General Public License v3.0 6 votes vote down vote up
@Override
public ConfirmDialog create(String caption, String message, String okCaption, String cancelCaption, String notOkCaption) {
    ConfirmDialog d = super.create(caption, message, okCaption, cancelCaption, notOkCaption);

    d.getContent().setStyleName("custom-dialog");
    d.getContent().setHeightUndefined();
    d.setHeightUndefined();

    Button ok = d.getOkButton();
    ok.setStyleName(WebThemes.BUTTON_ACTION);

    HorizontalLayout buttons = (HorizontalLayout) ok.getParent();
    buttons.setHeightUndefined();

    Button cancelBtn = d.getCancelButton();
    cancelBtn.setStyleName(WebThemes.BUTTON_OPTION);
    cancelBtn.focus();

    return d;
}
 
Example 3
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");
}