Search in sources :

Example 1 with Tab

use of com.vaadin.flow.component.tabs.Tab in project flow by vaadin.

the class MainView method createTab.

private static Tab createTab(String text, Class<? extends Component> navigationTarget) {
    final Tab tab = new Tab();
    tab.add(new RouterLink(text, navigationTarget));
    ComponentUtil.setData(tab, Class.class, navigationTarget);
    return tab;
}
Also used : RouterLink(com.vaadin.flow.router.RouterLink) Tab(com.vaadin.flow.component.tabs.Tab)

Aggregations

Tab (com.vaadin.flow.component.tabs.Tab)1 RouterLink (com.vaadin.flow.router.RouterLink)1