Example usage for com.vaadin.ui VerticalLayout setSizeFull

List of usage examples for com.vaadin.ui VerticalLayout setSizeFull

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout setSizeFull.

Prototype

@Override
    public void setSizeFull() 

Source Link

Usage

From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableLayout.java

License:Open Source License

private void buildLayout() {
    setSizeFull();//from   w w  w . j av a  2 s.co m
    setSpacing(true);
    setMargin(false);
    setStyleName("group");
    final VerticalLayout tableHeaderLayout = new VerticalLayout();
    tableHeaderLayout.setSizeFull();
    tableHeaderLayout.setSpacing(false);
    tableHeaderLayout.setMargin(false);

    tableHeaderLayout.setStyleName("table-layout");
    tableHeaderLayout.addComponent(tableHeader);

    tableHeaderLayout.setComponentAlignment(tableHeader, Alignment.TOP_CENTER);
    if (isShortCutKeysRequired()) {
        final Panel tablePanel = new Panel();
        tablePanel.setStyleName("table-panel");
        tablePanel.setHeight(100.0F, Unit.PERCENTAGE);
        tablePanel.setContent(table);
        tablePanel.addActionHandler(getShortCutKeysHandler(i18n));
        tablePanel.addStyleName(ValoTheme.PANEL_BORDERLESS);
        tableHeaderLayout.addComponent(tablePanel);
        tableHeaderLayout.setComponentAlignment(tablePanel, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(tablePanel, 1.0F);
    } else {
        tableHeaderLayout.addComponent(table);
        tableHeaderLayout.setComponentAlignment(table, Alignment.TOP_CENTER);
        tableHeaderLayout.setExpandRatio(table, 1.0F);
    }

    addComponent(tableHeaderLayout);
    addComponent(detailsLayout);
    setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
    setComponentAlignment(detailsLayout, Alignment.TOP_CENTER);
    setExpandRatio(tableHeaderLayout, 1.0F);
}

From source file:org.eclipse.hawkbit.ui.components.DistributionSetInfoPanel.java

License:Open Source License

/**
 * Decorate.//w w  w  .jav a  2  s .c om
 * 
 * @param distributionSet
 *            as DistributionSet
 * @param caption
 *            as String
 * @param style1
 *            as String
 * @param style2
 *            as String
 */
private void decorate(final DistributionSet distributionSet, final String caption, final String style1,
        final String style2) {
    final VaadinMessageSource i18n = SpringContextHelper.getBean(VaadinMessageSource.class);
    final VerticalLayout layout = new VerticalLayout();
    // Display distribution set name
    layout.addComponent(SPUIComponentProvider.createNameValueLabel(i18n.getMessage("label.dist.details.name"),
            distributionSet.getName(), distributionSet.getVersion()));

    /* Module info */
    distributionSet.getModules()
            .forEach(module -> layout.addComponent(getSWModlabel(module.getType().getName(), module)));

    layout.setSizeFull();
    layout.setMargin(false);
    layout.setSpacing(false);

    setContent(layout);
    // Decorate specific
    setCaption(caption);
    addStyleName(style1);
    addStyleName(style2);
    addStyleName("small");
    setImmediate(false);
}

From source file:org.eclipse.hawkbit.ui.distributions.disttype.CreateUpdateDistSetTypeLayout.java

License:Open Source License

@Override
protected void buildLayout() {

    super.buildLayout();
    ColorPickerHelper.setRgbSliderValues(colorPickerLayout);
    getFormLayout().addComponent(typeKey, 4);

    distTypeSelectLayout = createTwinColumnLayout();

    final VerticalLayout twinTableLayout = new VerticalLayout();
    twinTableLayout.setSizeFull();
    twinTableLayout.addComponent(distTypeSelectLayout);

    mainLayout.addComponent(twinTableLayout, 2, 0);
}

From source file:org.eclipse.hawkbit.ui.filtermanagement.FilterManagementView.java

License:Open Source License

private void buildFilterDetailOrCreateView() {
    removeAllComponents();/*w w  w.j a v a 2  s  .c o  m*/
    final VerticalLayout tableHeaderLayout = new VerticalLayout();
    tableHeaderLayout.setSizeFull();
    tableHeaderLayout.setSpacing(false);
    tableHeaderLayout.setMargin(false);
    tableHeaderLayout.setStyleName("table-layout");
    tableHeaderLayout.addComponent(createNewFilterHeader);
    tableHeaderLayout.setComponentAlignment(createNewFilterHeader, Alignment.TOP_CENTER);
    tableHeaderLayout.addComponent(createNewFilterTable);
    tableHeaderLayout.setComponentAlignment(createNewFilterTable, Alignment.TOP_CENTER);
    tableHeaderLayout.setExpandRatio(createNewFilterTable, 1.0F);

    addComponent(tableHeaderLayout);
    setComponentAlignment(tableHeaderLayout, Alignment.TOP_CENTER);
    setExpandRatio(tableHeaderLayout, 1.0F);

    final HorizontalLayout targetsCountmessageLabelLayout = addTargetFilterMessageLabel();
    addComponent(targetsCountmessageLabelLayout);
    setComponentAlignment(targetsCountmessageLabelLayout, Alignment.BOTTOM_CENTER);

}

From source file:org.eclipse.hawkbit.ui.filtermanagement.FilterManagementView.java

License:Open Source License

private void viewListView() {
    removeAllComponents();//from  w  w  w  .  java 2  s .co m
    final VerticalLayout tableListViewLayout = new VerticalLayout();
    tableListViewLayout.setSizeFull();
    tableListViewLayout.setSpacing(false);
    tableListViewLayout.setMargin(false);
    tableListViewLayout.setStyleName("table-layout");
    tableListViewLayout.addComponent(targetFilterHeader);
    tableListViewLayout.setComponentAlignment(targetFilterHeader, Alignment.TOP_CENTER);
    tableListViewLayout.addComponent(targetFilterTable);
    tableListViewLayout.setComponentAlignment(targetFilterTable, Alignment.TOP_CENTER);
    tableListViewLayout.setExpandRatio(targetFilterTable, 1.0F);
    addComponent(tableListViewLayout);
}

From source file:org.eclipse.hawkbit.ui.HawkbitUI.java

License:Open Source License

@Override
protected void init(final VaadinRequest vaadinRequest) {
    LOG.info("ManagementUI init starts uiid - {}", getUI().getUIId());
    if (pushStrategy != null) {
        pushStrategy.init(getUI());// ww w  .  j  av  a 2 s .c om
    }
    addDetachListener(this);
    SpringContextHelper.setContext(context);

    Responsive.makeResponsive(this);
    addStyleName(ValoTheme.UI_WITH_MENU);
    setResponsive(Boolean.TRUE);

    final HorizontalLayout rootLayout = new HorizontalLayout();
    rootLayout.setSizeFull();

    dashboardMenu.init();
    dashboardMenu.setResponsive(true);

    final VerticalLayout contentVerticalLayout = new VerticalLayout();
    contentVerticalLayout.setSizeFull();
    contentVerticalLayout.setStyleName("main-content");
    contentVerticalLayout.addComponent(buildHeader());
    contentVerticalLayout.addComponent(buildViewTitle());

    final Panel content = buildContent();
    contentVerticalLayout.addComponent(content);
    contentVerticalLayout.setExpandRatio(content, 1);

    rootLayout.addComponent(dashboardMenu);
    rootLayout.addComponent(contentVerticalLayout);
    rootLayout.setExpandRatio(contentVerticalLayout, 1);
    setContent(rootLayout);

    final Navigator navigator = new Navigator(this, content);
    navigator.addViewChangeListener(new ViewChangeListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public boolean beforeViewChange(final ViewChangeEvent event) {
            return true;
        }

        @Override
        public void afterViewChange(final ViewChangeEvent event) {
            final DashboardMenuItem view = dashboardMenu.getByViewName(event.getViewName());
            dashboardMenu.postViewChange(new PostViewChangeEvent(view));
            if (view == null) {
                viewTitle.setCaption(null);
                return;
            }
            viewTitle.setCaption(view.getDashboardCaptionLong());
            notificationUnreadButton.setCurrentView(event.getNewView());
        }
    });

    navigator.setErrorView(errorview);
    navigator.addProvider(new ManagementViewProvider());
    setNavigator(navigator);
    navigator.addView(EMPTY_VIEW, new Navigator.EmptyView());
    // set locale is required for I18N class also, to get the locale from
    // cookie
    final String locale = getLocaleId(SPUIDefinitions.getAvailableLocales());
    setLocale(new Locale(locale));

    if (UI.getCurrent().getErrorHandler() == null) {
        UI.getCurrent().setErrorHandler(new HawkbitUIErrorHandler());
    }

    LOG.info("Current locale of the application is : {}", HawkbitCommonUtil.getLocale());
}

From source file:org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI.java

License:Open Source License

private VerticalLayout buildContent() {
    final VerticalLayout rootLayout = new VerticalLayout();
    rootLayout.setSizeFull();
    rootLayout.setStyleName("main-content");

    rootLayout.addComponent(buildHeader());

    addLoginForm(rootLayout);//from ww  w  .j  a v  a 2  s . c om

    addFooter(rootLayout);

    return rootLayout;
}

From source file:org.eclipse.hawkbit.ui.login.HawkbitLoginUI.java

License:Open Source License

@Override
protected void init(final VaadinRequest request) {
    SpringContextHelper.setContext(context);

    final VerticalLayout rootLayout = new VerticalLayout();
    final Component header = buildHeader();

    rootLayout.addComponent(header);//ww w. j  ava2 s. c  o  m
    rootLayout.setSizeFull();

    final HorizontalLayout content = new HorizontalLayout();
    rootLayout.addComponent(content);
    content.setStyleName("view-content");
    content.setSizeFull();
    rootLayout.setStyleName("main-content");

    rootLayout.setExpandRatio(header, 1.0F);
    rootLayout.setExpandRatio(content, 2.0F);
    final Resource resource = context
            .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html");

    try (InputStream resourceStream = resource.getInputStream()) {
        final CustomLayout customLayout = new CustomLayout(resourceStream);
        customLayout.setSizeUndefined();
        rootLayout.addComponent(customLayout);
    } catch (final IOException ex) {
        LOG.error("Footer file cannot be loaded", ex);
    }
    setContent(rootLayout);

    final Navigator navigator = new Navigator(this, content);
    navigator.addProvider(viewProvider);
    setNavigator(navigator);
}

From source file:org.eclipse.hawkbit.ui.management.dstable.DistributionDetails.java

License:Open Source License

private VerticalLayout createSoftwareModuleTab() {
    final VerticalLayout swLayout = getTabLayout();
    swLayout.setSizeFull();
    swLayout.addComponent(softwareModuleTable);
    return swLayout;
}

From source file:org.eclipse.hawkbit.ui.management.targettable.TargetBulkUpdateWindowLayout.java

License:Open Source License

private VerticalLayout getTokenFieldLayout() {
    final TokenField tokenField = targetBulkTokenTags.getTokenField();
    final VerticalLayout tokenLayout = SPUIComponentProvider.getDetailTabLayout();
    tokenLayout.addStyleName("bulk-target-tags-layout");
    tokenLayout.addComponent(tokenField);
    tokenLayout.setSpacing(false);//from   www .java2s .  co  m
    tokenLayout.setMargin(false);
    tokenLayout.setSizeFull();
    tokenLayout.setHeight("100px");
    tokenLayout.setId(UIComponentIdProvider.BULK_UPLOAD_TAG);
    return tokenLayout;
}