Example usage for com.vaadin.ui VerticalLayout addStyleName

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

Introduction

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

Prototype

@Override
    public void addStyleName(String style) 

Source Link

Usage

From source file:org.eclipse.hawkbit.ui.common.AbstractMetadataPopupLayout.java

License:Open Source License

private void buildLayout() {
    final HorizontalLayout headerLayout = new HorizontalLayout();
    headerLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
    headerLayout.setSpacing(false);//from  ww  w. ja  v  a2  s. c o  m
    headerLayout.setMargin(false);
    headerLayout.setSizeFull();
    headerLayout.addComponent(headerCaption);
    if (hasCreatePermission()) {
        headerLayout.addComponents(addIcon);
        headerLayout.setComponentAlignment(addIcon, Alignment.MIDDLE_RIGHT);
    }
    headerLayout.setExpandRatio(headerCaption, 1.0F);

    final HorizontalLayout headerWrapperLayout = new HorizontalLayout();
    headerWrapperLayout
            .addStyleName("bordered-layout" + " " + "no-border-bottom" + " " + "metadata-table-margin");
    headerWrapperLayout.addComponent(headerLayout);
    headerWrapperLayout.setWidth("100%");
    headerLayout.setHeight("30px");

    final VerticalLayout tableLayout = new VerticalLayout();
    tableLayout.setSizeFull();
    tableLayout.setHeight("100%");
    tableLayout.addComponent(headerWrapperLayout);
    tableLayout.addComponent(metaDataGrid);
    tableLayout.addStyleName("table-layout");
    tableLayout.setExpandRatio(metaDataGrid, 1.0F);

    final VerticalLayout metadataFieldsLayout = createMetadataFieldsLayout();

    mainLayout = new HorizontalLayout();
    mainLayout.addComponent(tableLayout);
    mainLayout.addComponent(metadataFieldsLayout);
    mainLayout.setExpandRatio(tableLayout, 0.5F);
    mainLayout.setExpandRatio(metadataFieldsLayout, 0.5F);
    mainLayout.setSizeFull();
    mainLayout.setSpacing(true);
    setCompositionRoot(mainLayout);
    setSizeFull();
}

From source file:org.eclipse.hawkbit.ui.common.confirmwindow.layout.AbstractConfirmationWindowLayout.java

License:Open Source License

private void buildLayout() {
    final Map<String, ConfirmationTab> confimrationTabs = getConfirmationTabs();
    for (final Entry<String, ConfirmationTab> captionConfirmationTab : confimrationTabs.entrySet()) {
        accordion.addTab(captionConfirmationTab.getValue(), captionConfirmationTab.getKey(), null);
    }/*from   w  w  w.  j  a v  a  2  s  .c  o  m*/
    final VerticalLayout confirmActionsLayout = new VerticalLayout();
    confirmActionsLayout.addStyleName(SPUIStyleDefinitions.CONFIRM_WINDOW_ACCORDIAN);
    confirmActionsLayout.setSpacing(false);
    confirmActionsLayout.setMargin(false);
    confirmActionsLayout.addComponent(actionMessage);
    confirmActionsLayout.addComponent(accordion);

    addComponent(confirmActionsLayout);
    setComponentAlignment(confirmActionsLayout, Alignment.MIDDLE_CENTER);
    setSpacing(false);
    setMargin(false);
}

From source file:org.eclipse.hawkbit.ui.common.detailslayout.AbstractTableDetailsLayout.java

License:Open Source License

protected final VerticalLayout createTabLayout() {
    final VerticalLayout tabLayout = SPUIComponentProvider.getDetailTabLayout();
    tabLayout.addStyleName("details-layout");
    return tabLayout;
}

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

License:Open Source License

protected Component buildLoginForm() {

    final VerticalLayout loginPanel = new VerticalLayout();
    loginPanel.setSizeUndefined();//w  w w  .ja  v  a  2s . c  o  m
    loginPanel.setSpacing(true);
    loginPanel.addStyleName("login-panel");
    Responsive.makeResponsive(loginPanel);
    loginPanel.addComponent(buildFields());
    if (isDemo) {
        loginPanel.addComponent(buildDisclaimer());
    }
    loginPanel.addComponent(buildLinks());

    checkBrowserSupport(loginPanel);

    return loginPanel;
}

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

License:Open Source License

private Component buildLoginForm() {

    final VerticalLayout loginPanel = new VerticalLayout();
    loginPanel.setSizeUndefined();// ww w .j a v  a  2  s.  c  o  m
    loginPanel.setSpacing(true);
    loginPanel.addStyleName("dashboard-view");
    loginPanel.addStyleName("login-panel");
    Responsive.makeResponsive(loginPanel);
    loginPanel.addComponent(buildFields());
    loginPanel.addComponent(buildLinks());

    // Check if IE browser is not supported ( < IE11 )
    if (isUnsupportedBrowser()) {
        // Disable sign-in button and display a message
        signin.setEnabled(Boolean.FALSE);
        loginPanel.addComponent(buildUnsupportedMessage());
    }

    return loginPanel;
}

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  w  w  w .  j ava  2  s. c o  m
    tokenLayout.setMargin(false);
    tokenLayout.setSizeFull();
    tokenLayout.setHeight("100px");
    tokenLayout.setId(UIComponentIdProvider.BULK_UPLOAD_TAG);
    return tokenLayout;
}

From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java

License:Open Source License

private static VerticalLayout getMenuLayout() {
    final VerticalLayout menuContent = new VerticalLayout();
    menuContent.addStyleName(ValoTheme.MENU_PART);
    menuContent.addStyleName("sidebar");

    menuContent.addStyleName("no-vertical-drag-hints");
    menuContent.addStyleName("no-horizontal-drag-hints");
    menuContent.setWidth(null);/*from   w ww.j ava 2  s  .  c  o m*/
    menuContent.setHeight("100%");
    return menuContent;
}

From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java

License:Open Source License

private VerticalLayout buildLinksAndVersion() {
    final VerticalLayout links = new VerticalLayout();
    links.setSpacing(true);/*from   w  w w  .  j  a  v a2  s  .c  om*/
    links.addStyleName("links");
    final String linkStyle = "v-link";

    if (!uiProperties.getLinks().getDocumentation().getRoot().isEmpty()) {
        final Link docuLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_DOCUMENTATION,
                i18n.getMessage("link.documentation.name"),
                uiProperties.getLinks().getDocumentation().getRoot(), FontAwesome.QUESTION_CIRCLE, "_blank",
                linkStyle);
        docuLink.setSizeFull();
        links.addComponent(docuLink);
        links.setComponentAlignment(docuLink, Alignment.BOTTOM_CENTER);
    }

    if (!uiProperties.getLinks().getUserManagement().isEmpty()) {
        final Link userManagementLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_USERMANAGEMENT,
                i18n.getMessage("link.usermanagement.name"), uiProperties.getLinks().getUserManagement(),
                FontAwesome.USERS, "_blank", linkStyle);
        links.addComponent(userManagementLink);
        userManagementLink.setSizeFull();
        links.setComponentAlignment(userManagementLink, Alignment.BOTTOM_CENTER);
    }

    if (!uiProperties.getLinks().getSupport().isEmpty()) {
        final Link supportLink = SPUIComponentProvider.getLink(UIComponentIdProvider.LINK_SUPPORT,
                i18n.getMessage("link.support.name"), uiProperties.getLinks().getSupport(),
                FontAwesome.ENVELOPE_O, "", linkStyle);
        supportLink.setSizeFull();
        links.addComponent(supportLink);
        links.setComponentAlignment(supportLink, Alignment.BOTTOM_CENTER);

    }

    final Component buildVersionInfo = buildVersionInfo();
    links.addComponent(buildVersionInfo);
    links.setComponentAlignment(buildVersionInfo, Alignment.BOTTOM_CENTER);
    links.setSizeFull();
    links.setHeightUndefined();
    return links;
}

From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java

License:Open Source License

private VerticalLayout buildMenuItems() {
    final VerticalLayout menuItemsLayout = new VerticalLayout();
    menuItemsLayout.addStyleName("valo-menuitems");
    menuItemsLayout.setHeight(100.0F, Unit.PERCENTAGE);

    final List<DashboardMenuItem> accessibleViews = getAccessibleViews();
    if (accessibleViews.isEmpty()) {
        accessibleViewsEmpty = true;//w w  w .j a va  2s .c o  m
        return menuItemsLayout;
    }
    initialViewName = accessibleViews.get(0).getViewName();
    for (final DashboardMenuItem view : accessibleViews) {
        final ValoMenuItemButton menuItemComponent = new ValoMenuItemButton(view);
        menuButtons.add(menuItemComponent);
        menuItemsLayout.addComponent(buildLabelWrapper(menuItemComponent, view.getNotificationUnreadLabel()));
    }
    return menuItemsLayout;
}

From source file:org.ikasan.dashboard.ui.framework.panel.LandingViewPanel.java

License:BSD License

protected void init() {
    addStyleName(ValoTheme.PANEL_BORDERLESS);

    VerticalLayout verticalLayout = new VerticalLayout();
    verticalLayout.setWidth("100%");
    verticalLayout.setHeight("100%");
    verticalLayout.setMargin(true);//w  ww  .ja  v  a 2  s.c  o m
    verticalLayout.addStyleName("dashboard-view");

    Responsive.makeResponsive(verticalLayout);

    Component content = buildContent();
    verticalLayout.addComponent(content);

    verticalLayout.setExpandRatio(content, 1);

    this.setSizeFull();
    this.setContent(verticalLayout);
}