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 ClassesModifier and TypeClassDescriptionstatic classAn event that is fired when notifications count is changed.protected classNested 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
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected org.springframework.context.ApplicationContextprotected BackgroundWorkerprotected CurrentUserSubstitutionprotected DataManagerprotected DialogWindowsprotected booleanprotected com.vaadin.flow.shared.Registrationprotected MetadataFields inherited from class io.jmix.notificationsflowui.kit.component.notificationsindicator.JmixNotificationsIndicator
icon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.shared.RegistrationaddClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<NotificationsIndicator>> listener) com.vaadin.flow.shared.RegistrationaddCountChangeListener(com.vaadin.flow.component.ComponentEventListener<NotificationsIndicator.CountChangeEvent> listener) Register new count change listener.voidprotected voidprotected voidfireCountChangeEvent(Integer previousCount, Integer count) protected booleanprotected voidprotected voidprotected voidonApplicationEvent(org.springframework.context.ApplicationEvent event) protected voidonComponentClick(com.vaadin.flow.component.ClickEvent<NotificationsIndicator> event) protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent) protected voidprotected voidprotected voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class io.jmix.notificationsflowui.kit.component.notificationsindicator.JmixNotificationsIndicator
doSetCount, getCount, getIcon, setCount, setIcon, setupComponentToIconSlot, setupRefreshIconMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods 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, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods 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
-
dataManager
-
accessManager
-
metadata
-
currentUserSubstitution
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.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
- Overrides:
fireCountChangeEventin classJmixNotificationsIndicator
-
onComponentClick
-
reloadCounter
protected void reloadCounter() -
hasAccessToInAppNotifications
protected boolean hasAccessToInAppNotifications() -
initInAppNotificationEventListener
protected void initInAppNotificationEventListener() -
onApplicationEvent
protected void onApplicationEvent(org.springframework.context.ApplicationEvent event) -
onVaadinSessionNotificationEvent
-
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:
onDetachin classcom.vaadin.flow.component.Component
-
removeInAppNotificationRegistration
protected void removeInAppNotificationRegistration()
-