Package org.patternfly.component.badge
Class Badge
- All Implemented Interfaces:
ElementAttributeMethods<HTMLElement,,Badge> ElementClassListMethods<HTMLElement,,Badge> ElementConsumerMethods<HTMLElement,,Badge> ElementContainerMethods<HTMLElement,,Badge> ElementEventMethods<HTMLElement,,Badge> ElementIdMethods<HTMLElement,,Badge> ElementQueryMethods<HTMLElement>,HTMLElementAttributeMethods<HTMLElement,,Badge> HTMLElementDataMethods<HTMLElement,,Badge> HTMLElementStyleMethods<HTMLElement,,Badge> HTMLElementVisibilityMethods<HTMLElement,,Badge> IsElement<HTMLElement>,TypedBuilder<HTMLElement,,Badge> Component,HasObservableValue<HTMLElement,,Badge, Integer> HasValue<Integer>
public class Badge
extends BaseComponent<HTMLElement,Badge>
implements HasObservableValue<HTMLElement,Badge,Integer>, HasValue<Integer>
A badge is used to annotate other information like a label or an object name.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Badgebadge(int count) static Badgebadge(int count, int limit) Binds an observable value to this component.intcount()count(int count) Same as count(count, false)count(int count, boolean fireEvent) Sets the count of this badge.Use a function to render the text for the value ofcount().limit(int limit) Sets the limit of this badgemaxDisplay(Function<Integer, String> maxDisplay) Use a function to render the text ifcount()>limit(int).Defines a change handler that is called when thevalue()of this badge changes.read()Marks the badge as read.screenReader(String text) that()unread()Marks the badge as unread.value()Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hidden
-
Method Details
-
badge
-
badge
-
read
Marks the badge as read. -
unread
Marks the badge as unread. -
count
Same as count(count, false) -
count
Sets the count of this badge. -
display
Use a function to render the text for the value ofcount(). If not setString.valueOf(count)is used implicitly. -
maxDisplay
Use a function to render the text ifcount()>limit(int). If not setcount + "+"is used implicitly. -
limit
Sets the limit of this badge -
screenReader
-
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,Badge, Integer>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement,Badge>
-
onChange
Defines a change handler that is called when thevalue()of this badge changes. -
count
public int count() -
value
-