Search in sources :

Example 1 with DefaultNotificationHolder

use of com.github.appreciated.app.layout.builder.entities.DefaultNotificationHolder 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);
}
Also used : DefaultSpringNavigationElementInfoProvider(com.github.appreciated.app.layout.builder.providers.DefaultSpringNavigationElementInfoProvider) DefaultBadgeHolder(com.github.appreciated.app.layout.builder.entities.DefaultBadgeHolder) MenuHeader(com.github.appreciated.app.layout.component.MenuHeader) DefaultNotificationHolder(com.github.appreciated.app.layout.builder.entities.DefaultNotificationHolder) ThemeResource(com.vaadin.server.ThemeResource) AppBarNotificationButton(com.github.appreciated.app.layout.component.button.AppBarNotificationButton) AppLayoutComponent(com.github.appreciated.app.layout.behaviour.AppLayoutComponent)

Aggregations

AppLayoutComponent (com.github.appreciated.app.layout.behaviour.AppLayoutComponent)1 DefaultBadgeHolder (com.github.appreciated.app.layout.builder.entities.DefaultBadgeHolder)1 DefaultNotificationHolder (com.github.appreciated.app.layout.builder.entities.DefaultNotificationHolder)1 DefaultSpringNavigationElementInfoProvider (com.github.appreciated.app.layout.builder.providers.DefaultSpringNavigationElementInfoProvider)1 MenuHeader (com.github.appreciated.app.layout.component.MenuHeader)1 AppBarNotificationButton (com.github.appreciated.app.layout.component.button.AppBarNotificationButton)1 ThemeResource (com.vaadin.server.ThemeResource)1