use of com.vaadin.flow.component.tabs.Tabs in project ArchCNL by Mari-Wie.
the class SideBarWidget method addTabs.
public void addTabs(final QueryResultsComponent defaultQueryView, final CustomQueryView customQueryView, final FreeTextQueryComponent freeTextQueryView) {
generalInformationTab = new SideBarTab("General Information", VaadinIcon.INFO_CIRCLE, defaultQueryView);
customQueryTab = new SideBarTab("Custom Queries", VaadinIcon.AUTOMATION, customQueryView);
freeTextQueryTab = new SideBarTab("Free Text Queries", VaadinIcon.TEXT_INPUT, freeTextQueryView);
tabs = new Tabs(generalInformationTab, customQueryTab, freeTextQueryTab);
tabs.setOrientation(Tabs.Orientation.VERTICAL);
tabs.setHeightFull();
tabs.addSelectedChangeListener(event -> {
if (event.getSelectedTab() instanceof SideBarTab) {
final SideBarTab tab = (SideBarTab) event.getSelectedTab();
fireEvent(new ShowComponentRequestedEvent(this, true, tab.getLinkedComponent()));
}
});
add(tabs);
}
use of com.vaadin.flow.component.tabs.Tabs in project flow by vaadin.
the class MainView method createMenu.
private Tabs createMenu() {
final Tabs tabs = new Tabs();
tabs.setOrientation(Tabs.Orientation.VERTICAL);
tabs.addThemeVariants(TabsVariant.LUMO_MINIMAL);
tabs.setId("tabs");
tabs.add(createMenuItems());
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project sapl-demos by heutelbeck.
the class ContentView method createRightUpperSideTabVisibleLogic.
private void createRightUpperSideTabVisibleLogic(Div page1JsonEditorDiv, Div page2MockInput, Div page3MockHelpText) {
this.tabsToPages = new HashMap<>();
tabsToPages.put(this.tab1AuthzSubInput, page1JsonEditorDiv);
tabsToPages.put(this.tab2MockInput, page2MockInput);
tabsToPages.put(this.tab3MockHelpText, page3MockHelpText);
this.tabs = new Tabs(this.tab1AuthzSubInput, this.tab2MockInput, this.tab3MockHelpText);
this.tabs.addSelectedChangeListener(event -> {
this.tabsToPages.values().forEach(page -> page.setVisible(false));
Component selectedTab = this.tabs.getSelectedTab();
Component selectedPage = this.tabsToPages.get(selectedTab);
if (selectedTab.equals(tab2MockInput)) {
mockDefinitionEditor.refresh();
}
if (selectedTab.equals(tab1AuthzSubInput)) {
authzSubEditor.refresh();
}
selectedPage.setVisible(true);
});
}
use of com.vaadin.flow.component.tabs.Tabs in project databasemysqlexample by Liskokuningas.
the class MainView method createMenuTabs.
private static Tabs createMenuTabs() {
final Tabs tabs = new Tabs();
tabs.setOrientation(Tabs.Orientation.HORIZONTAL);
tabs.add(getAvailableTabs());
return tabs;
}
use of com.vaadin.flow.component.tabs.Tabs in project ArchCNL by Mari-Wie.
the class SideBarWidget method addTabs.
public void addTabs(final QueryResultsComponent defaultQueryView, List<PredefinedQueryComponent> predefinedQueries, final CustomQueryView customQueryView, final FreeTextQueryComponent freeTextQueryView) {
generalInformationTab = new SideBarTab("General Information", VaadinIcon.INFO_CIRCLE, defaultQueryView);
customQueryTab = new SideBarTab("Custom Queries", VaadinIcon.AUTOMATION, customQueryView);
freeTextQueryTab = new SideBarTab("Free Text Queries", VaadinIcon.TEXT_INPUT, freeTextQueryView);
tabs = new Tabs(generalInformationTab);
predefinedQueries.forEach(query -> addPredefinedQueryTab(query, query.getName()));
tabs.add(customQueryTab);
tabs.add(freeTextQueryTab);
tabs.setOrientation(Tabs.Orientation.VERTICAL);
tabs.setHeightFull();
tabs.addSelectedChangeListener(event -> {
if (event.getSelectedTab() instanceof SideBarTab) {
final SideBarTab tab = (SideBarTab) event.getSelectedTab();
fireEvent(new ShowComponentRequestedEvent(this, true, tab.getLinkedComponent()));
}
});
add(tabs);
}
Aggregations