Search in sources :

Example 1 with BreadcrumbNavigation

use of io.sunshower.zephyr.ui.controls.BreadcrumbNavigation in project aire-components by aire-ux.

the class ZephyrManagementConsoleView method decorate.

@Override
public void decorate(ApplicationLayout layout) {
    homeButton = new NavigationBarButton(MainView.class, new Image("images/icon.svg", "Home"));
    homeButton.setClassName("container-end");
    layout.getTop().add(homeButton);
    val homeButton = new NavigationBarButton(ModuleGrid.class, List.of("management/modules"), MatchMode.Contains, VaadinIcon.PLUG.create());
    layout.getNavigation().add(homeButton);
    layout.getTop().add(new BreadcrumbNavigation());
}
Also used : lombok.val(lombok.val) BreadcrumbNavigation(io.sunshower.zephyr.ui.controls.BreadcrumbNavigation) MainView(io.sunshower.zephyr.MainView) NavigationBarButton(io.sunshower.zephyr.ui.controls.NavigationBarButton) Image(com.vaadin.flow.component.html.Image)

Example 2 with BreadcrumbNavigation

use of io.sunshower.zephyr.ui.controls.BreadcrumbNavigation in project aire-components by aire-ux.

the class MainView method createTop.

protected HasComponents createTop() {
    val topNav = super.createTop();
    topNav.add(new BreadcrumbNavigation());
    val menuBar = new MenuBar();
    menuBar.addThemeVariants(MenuBarVariant.LUMO_SMALL, MenuBarVariant.LUMO_ICON);
    var homeButton = new NavigationBarButton(MainView.class, new Image("images/icon.svg", "Home"));
    homeButton.setClassName("container-end");
    topNav.add(homeButton);
    val item = menuBar.addItem(VaadinIcon.MENU.create());
    val submenu = item.getSubMenu();
    submenu.addItem(new RouterLink("Zephyr", ModuleGrid.class));
    topNav.add(menuBar);
    return topNav;
}
Also used : lombok.val(lombok.val) BreadcrumbNavigation(io.sunshower.zephyr.ui.controls.BreadcrumbNavigation) RouterLink(com.vaadin.flow.router.RouterLink) NavigationBarButton(io.sunshower.zephyr.ui.controls.NavigationBarButton) MenuBar(com.vaadin.flow.component.menubar.MenuBar) Image(com.vaadin.flow.component.html.Image) ModuleGrid(io.sunshower.zephyr.management.ModuleGrid)

Aggregations

Image (com.vaadin.flow.component.html.Image)2 BreadcrumbNavigation (io.sunshower.zephyr.ui.controls.BreadcrumbNavigation)2 NavigationBarButton (io.sunshower.zephyr.ui.controls.NavigationBarButton)2 lombok.val (lombok.val)2 MenuBar (com.vaadin.flow.component.menubar.MenuBar)1 RouterLink (com.vaadin.flow.router.RouterLink)1 MainView (io.sunshower.zephyr.MainView)1 ModuleGrid (io.sunshower.zephyr.management.ModuleGrid)1