Example usage for com.vaadin.ui.themes ValoTheme TABSHEET_ICONS_ON_TOP

List of usage examples for com.vaadin.ui.themes ValoTheme TABSHEET_ICONS_ON_TOP

Introduction

In this page you can find the example usage for com.vaadin.ui.themes ValoTheme TABSHEET_ICONS_ON_TOP.

Prototype

String TABSHEET_ICONS_ON_TOP

To view the source code for com.vaadin.ui.themes ValoTheme TABSHEET_ICONS_ON_TOP.

Click Source Link

Document

Display tab icons on top of the tab captions (by default the icons are place on the left side of the caption).

Usage

From source file:dhbw.clippinggorilla.userinterface.windows.PreferencesWindow.java

public PreferencesWindow(User user) {
    //setHeight("480px");
    //setWidth("720px");

    VerticalLayout windowContent = new VerticalLayout();
    windowContent.setWidth("100%");
    windowContent.setHeight("100%");
    windowContent.setMargin(new MarginInfo(true, false, false, false));

    TabSheet preferencesCategories = new TabSheet();
    preferencesCategories.setWidth("100%");
    preferencesCategories.setHeight("100%");
    preferencesCategories.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
    preferencesCategories.addStyleName(ValoTheme.TABSHEET_ICONS_ON_TOP);
    preferencesCategories.addStyleName(ValoTheme.TABSHEET_CENTERED_TABS);
    windowContent.addComponent(preferencesCategories);
    windowContent.setExpandRatio(preferencesCategories, 1f);

    preferencesCategories.addComponent(buildUserTab(user));
    preferencesCategories.addComponent(buildClippingsTab(user));
    preferencesCategories.addComponent(buildSupportTab(user));
    preferencesCategories.setSelectedTab(0);

    windowContent.addComponent(buildFooter(user));

    setContent(windowContent);/*from   w ww. ja va  2  s  . c o m*/
    setModal(true);
    addCloseShortcut(KeyCode.ENTER, null);
    setResizable(false);
    setClosable(false);
    setHeight("480px");
    setWidth("720px");
}