Class NotificationBadge
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement, NotificationBadge>
org.patternfly.component.notification.NotificationBadge
- All Implemented Interfaces:
ElementAttributeMethods<HTMLElement, NotificationBadge>, ElementClassListMethods<HTMLElement, NotificationBadge>, ElementConsumerMethods<HTMLElement, NotificationBadge>, ElementContainerMethods<HTMLElement, NotificationBadge>, ElementEventMethods<HTMLElement, NotificationBadge>, ElementIdMethods<HTMLElement, NotificationBadge>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, NotificationBadge>, HTMLElementDataMethods<HTMLElement, NotificationBadge>, HTMLElementStyleMethods<HTMLElement, NotificationBadge>, HTMLElementVisibilityMethods<HTMLElement, NotificationBadge>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, NotificationBadge>, Component, Expandable<HTMLElement, NotificationBadge>, HasObservableValue<HTMLElement, NotificationBadge, Integer>, HasValue<Integer>
public class NotificationBadge
extends BaseComponent<HTMLElement, NotificationBadge>
implements Expandable<HTMLElement, NotificationBadge>, HasObservableValue<HTMLElement, NotificationBadge, Integer>, HasValue<Integer>
A notification badge is a visual indicator that alerts users about incoming notifications.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbind(ObservableValue<Integer> ov) Binds an observable value to this component.Binds an observable status to this component.voidcollapse(boolean fireEvent) intcount()count(int count) Same as count(count, false)count(int count, boolean fireEvent) Sets the count of this notification badge.voidexpand(boolean fireEvent) booleanexpanded()static NotificationBadgestatic NotificationBadgenotificationBadge(int count) onChangeStatus(ChangeHandler<NotificationBadge, NotificationStatus> changeHandler) onChangeValue(ChangeHandler<NotificationBadge, Integer> changeHandler) Defines a change handler that is called when thevalue()of this notification badge changes.onClick(ComponentHandler<NotificationBadge> actionHandler) onToggle(ToggleHandler<NotificationBadge> toggleHandler) read()status()status(NotificationStatus status) Same as status(status, false)status(NotificationStatus status, boolean fireEvent) that()voidunread()value()Methods inherited from class BaseComponent
componentType, element, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface Expandable
collapse, expand, toggle, toggleMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hidden
-
Method Details
-
notificationBadge
-
notificationBadge
-
count
Same as count(count, false) -
count
Sets the count of this notification badge. -
bind
Binds an observable value to this component. If you're using an observable value, you must not usecount(int)orcount(int, boolean)to set the value. UseObservableValue.set(Object)instead.- Specified by:
bindin interfaceHasObservableValue<HTMLElement, NotificationBadge, Integer>
-
unread
-
read
-
attention
-
status
Same as status(status, false) -
status
-
bindStatus
Binds an observable status to this component. If you're using an observable status, you must not usestatus(NotificationStatus)orstatus(NotificationStatus, boolean)to set the status. UseObservableValue.set(Object)instead. -
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, NotificationBadge>
-
ariaLabel
-
onChangeValue
Defines a change handler that is called when thevalue()of this notification badge changes. -
onChangeStatus
public NotificationBadge onChangeStatus(ChangeHandler<NotificationBadge, NotificationStatus> changeHandler) -
onClick
-
onToggle
-
expand
public void expand(boolean fireEvent) - Specified by:
expandin interfaceExpandable<HTMLElement, NotificationBadge>
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapsein interfaceExpandable<HTMLElement, NotificationBadge>
-
triggerNotification
public void triggerNotification() -
count
public int count() -
expanded
public boolean expanded()- Specified by:
expandedin interfaceExpandable<HTMLElement, NotificationBadge>- Returns:
trueif the element's class list has the modifierClasses.expanded,falseotherwise.
-
value
-
status
-