Class NotificationsIndicator

java.lang.Object
com.vaadin.flow.component.Component
io.jmix.notificationsflowui.kit.component.notificationsindicator.JmixNotificationsIndicator
io.jmix.notificationsflowui.component.notificationsindicator.NotificationsIndicator
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<JmixNotificationsIndicator>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<JmixNotificationsIndicator>, com.vaadin.flow.component.FocusNotifier<JmixNotificationsIndicator>, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class NotificationsIndicator extends JmixNotificationsIndicator implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Components shows unread InAppNotification notifications count and opens dialog to read and manage notifications.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An event that is fired when notifications count is changed.
    protected class 
     

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected AccessManager
     
    protected org.springframework.context.ApplicationContext
     
     
     
    protected DataManager
     
    protected DialogWindows
     
    protected boolean
     
    protected com.vaadin.flow.shared.Registration
     
    protected Metadata
     

    Fields inherited from class io.jmix.notificationsflowui.kit.component.notificationsindicator.JmixNotificationsIndicator

    icon
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.shared.Registration
    addClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<NotificationsIndicator>> listener)
     
    com.vaadin.flow.shared.Registration
    addCountChangeListener(com.vaadin.flow.component.ComponentEventListener<NotificationsIndicator.CountChangeEvent> listener)
    Register new count change listener.
    void
     
    protected void
     
    protected void
    fireCountChangeEvent(Integer previousCount, Integer count)
     
    protected boolean
     
    protected void
     
    protected void
     
    protected void
    onApplicationEvent(org.springframework.context.ApplicationEvent event)
     
    protected void
    onComponentClick(com.vaadin.flow.component.ClickEvent<NotificationsIndicator> event)
     
    protected void
    onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
     
    protected void
     
    protected void
     
    protected void
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     

    Methods inherited from class io.jmix.notificationsflowui.kit.component.notificationsindicator.JmixNotificationsIndicator

    doSetCount, getCount, getIcon, setCount, setIcon, setupComponentToIconSlot, setupRefreshIcon

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • dialogWindows

      protected DialogWindows dialogWindows
    • dataManager

      protected DataManager dataManager
    • accessManager

      protected AccessManager accessManager
    • metadata

      protected Metadata metadata
    • currentUserSubstitution

      protected CurrentUserSubstitution currentUserSubstitution
    • backgroundWorker

      protected BackgroundWorker backgroundWorker
    • hasAccessToInAppNotifications

      protected boolean hasAccessToInAppNotifications
    • inAppNotificationRegistration

      protected com.vaadin.flow.shared.Registration inAppNotificationRegistration
  • Constructor Details

    • NotificationsIndicator

      public NotificationsIndicator()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • autowireDependencies

      protected void autowireDependencies()
    • initComponent

      protected void initComponent()
    • addCountChangeListener

      public com.vaadin.flow.shared.Registration addCountChangeListener(com.vaadin.flow.component.ComponentEventListener<NotificationsIndicator.CountChangeEvent> listener)
      Register new count change listener.
      Parameters:
      listener - listener to register
      Returns:
      a registration object for removing an event listener added to a source
    • fireCountChangeEvent

      protected void fireCountChangeEvent(Integer previousCount, Integer count)
      Overrides:
      fireCountChangeEvent in class JmixNotificationsIndicator
    • onComponentClick

      protected void onComponentClick(com.vaadin.flow.component.ClickEvent<NotificationsIndicator> event)
    • reloadCounter

      protected void reloadCounter()
    • hasAccessToInAppNotifications

      protected boolean hasAccessToInAppNotifications()
    • initInAppNotificationEventListener

      protected void initInAppNotificationEventListener()
    • onApplicationEvent

      protected void onApplicationEvent(org.springframework.context.ApplicationEvent event)
    • onVaadinSessionNotificationEvent

      protected void onVaadinSessionNotificationEvent(VaadinSessionNotificationEvent event)
    • addClickListener

      protected com.vaadin.flow.shared.Registration addClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<NotificationsIndicator>> listener)
    • onDetach

      protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
      Overrides:
      onDetach in class com.vaadin.flow.component.Component
    • removeInAppNotificationRegistration

      protected void removeInAppNotificationRegistration()