Search in sources :

Example 1 with DefaultNotification

use of com.github.appreciated.app.layout.addons.notification.entity.DefaultNotification in project vaadin-app-layout by appreciated.

the class NotificationView method furtherConfiguration.

@Override
public void furtherConfiguration(AppLayoutBuilder builder) {
    DefaultNotificationHolder notificationHolder = new DefaultNotificationHolder(newStatus -> {
    /*Do something with it*/
    });
    NotificationButton<DefaultNotification> button = new NotificationButton<>(VaadinIcon.BELL, notificationHolder);
    button.getWrappedComponent().setId("it-test-notification-button");
    button.setId("it-test-notification-button-wrapper");
    notificationHolder.add(new DefaultNotification("Header 1", "Description 1"), new DefaultNotification("Header 2", "Description 2"), new DefaultNotification("Header 3", "Description 3"), new DefaultNotification("Header 4", "Description 4"), new DefaultNotification("Header 5", "Description 5"));
    getAppBar().add(button);
}
Also used : DefaultNotificationHolder(com.github.appreciated.app.layout.addons.notification.DefaultNotificationHolder) NotificationButton(com.github.appreciated.app.layout.addons.notification.component.NotificationButton) DefaultNotification(com.github.appreciated.app.layout.addons.notification.entity.DefaultNotification)

Aggregations

DefaultNotificationHolder (com.github.appreciated.app.layout.addons.notification.DefaultNotificationHolder)1 NotificationButton (com.github.appreciated.app.layout.addons.notification.component.NotificationButton)1 DefaultNotification (com.github.appreciated.app.layout.addons.notification.entity.DefaultNotification)1