use of com.vaadin.flow.component.tabs.Tabs in project docs by vaadin.
the class AppLayoutBasic method getTabs.
// end::snippet[]
private Tabs getTabs() {
Tabs tabs = new Tabs();
tabs.add(createTab(VaadinIcon.DASHBOARD, "Dashboard"), createTab(VaadinIcon.CART, "Orders"), createTab(VaadinIcon.USER_HEART, "Customers"), createTab(VaadinIcon.PACKAGE, "Products"), createTab(VaadinIcon.RECORDS, "Documents"), createTab(VaadinIcon.LIST, "Tasks"), createTab(VaadinIcon.CHART, "Analytics"));
tabs.setOrientation(Tabs.Orientation.VERTICAL);
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project docs by vaadin.
the class AppLayoutDrawer method getTabs.
// end::snippet[]
private Tabs getTabs() {
Tabs tabs = new Tabs();
tabs.add(createTab(VaadinIcon.DASHBOARD, "Dashboard"), createTab(VaadinIcon.CART, "Orders"), createTab(VaadinIcon.USER_HEART, "Customers"), createTab(VaadinIcon.PACKAGE, "Products"), createTab(VaadinIcon.RECORDS, "Documents"), createTab(VaadinIcon.LIST, "Tasks"), createTab(VaadinIcon.CHART, "Analytics"));
tabs.setOrientation(Tabs.Orientation.VERTICAL);
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project docs by vaadin.
the class AppLayoutNavbar method getTabs.
// end::snippet[]
private Tabs getTabs() {
Tabs tabs = new Tabs();
tabs.getStyle().set("margin", "auto");
tabs.add(createTab("Dashboard"), createTab("Orders"), createTab("Customers"), createTab("Products"));
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project docs by vaadin.
the class AppLayoutNavbarPlacement method getTabs.
// end::snippet[]
private Tabs getTabs() {
Tabs tabs = new Tabs();
tabs.add(createTab(VaadinIcon.DASHBOARD, "Dashboard"), createTab(VaadinIcon.CART, "Orders"), createTab(VaadinIcon.USER_HEART, "Customers"), createTab(VaadinIcon.PACKAGE, "Products"), createTab(VaadinIcon.RECORDS, "Documents"), createTab(VaadinIcon.LIST, "Tasks"), createTab(VaadinIcon.CHART, "Analytics"));
tabs.setOrientation(Tabs.Orientation.VERTICAL);
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project sapl-demos by heutelbeck.
the class LoginView method createUserList.
private void createUserList() {
add(new H3("User list"));
Div contentContainer = new Div();
Map<String, Component> tabComponentMap = createUserTabs();
var tabs = new Tabs();
tabComponentMap.forEach((title, component) -> tabs.add(new Tab(title)));
tabs.addSelectedChangeListener(event -> {
contentContainer.removeAll();
contentContainer.add(tabComponentMap.get(event.getSelectedTab().getLabel()));
});
// init
contentContainer.add(tabComponentMap.get(tabs.getSelectedTab().getLabel()));
add(tabs, contentContainer);
}
Aggregations