use of com.github.appreciated.app.layout.builder.entities.DefaultBadgeHolder in project vaadin-app-layout by appreciated.
the class DemoUI method init.
// @Autowired
// SpringNavigator navigator;
public void init(VaadinRequest request) {
DefaultNotificationHolder notifications = new DefaultNotificationHolder();
DefaultBadgeHolder badge = new DefaultBadgeHolder();
AppLayoutComponent layout = AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProvider()).withTitle("App Layout Basic Example").addToAppBar(new AppBarNotificationButton(notifications, true)).withDesign(AppLayoutDesign.MATERIAL).withNavigatorConsumer(navigator -> {
/* Do something with it */
}).add(new MenuHeader("Version 0.9.21", new ThemeResource("logo.png")), HEADER).add("Home", VaadinIcons.HOME, badge, View1.class).add(SubmenuBuilder.get("My Submenu", VaadinIcons.PLUS).add("Charts", VaadinIcons.SPLINE_CHART, View2.class).add("Contact", VaadinIcons.CONNECT, View3.class).add("More", VaadinIcons.COG, View4.class).build()).add("Menu", VaadinIcons.MENU, View5.class).add("Elements", VaadinIcons.LIST, View6.class).build();
setContent(layout);
}
Aggregations