Package org.patternfly.component.alert
Class AlertGroup
java.lang.Object
org.patternfly.component.BaseComponent<HTMLUListElement,AlertGroup>
org.patternfly.component.alert.AlertGroup
- All Implemented Interfaces:
Iterable<Alert>,Container<HTMLUListElement,,AlertGroup> Finder<HTMLUListElement>,HasElement<HTMLUListElement,,AlertGroup> HasHTMLElement<HTMLUListElement,,AlertGroup> IsElement<HTMLUListElement>,TypedBuilder<HTMLUListElement,,AlertGroup> Component,HasItems<HTMLUListElement,AlertGroup, Alert>
public class AlertGroup
extends BaseComponent<HTMLUListElement,AlertGroup>
implements HasItems<HTMLUListElement,AlertGroup,Alert>
An alert group stacks and positions 2 or more alerts in a live region, either in a layer over the main content of a page or
inline with the page content. Alert groups should always rank alerts by age, stacking new alerts on top of old ones as they
surface.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AlertGroupalertGroup(AlertGroupType type) Creates a new alert group of the given type without timeout.static AlertGroupalertGroup(AlertGroupType type, int timeout) Creates a new alert group of the given type and timeout.voidclear()booleanisEmpty()iterator()intsize()that()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.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
alertGroup
Creates a new alert group of the given type without timeout.If the type is
AlertGroupType.toastthe alert group is added to the body or if it already has been added the existing alert group is returned (singleton pattern). -
alertGroup
Creates a new alert group of the given type and timeout.If the type is
AlertGroupType.toastthe alert group is added to the body or if it already has been added the existing alert group is returned (singleton pattern). -
add
- Specified by:
addin interfaceHasItems<HTMLUListElement,AlertGroup, Alert>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLUListElement,AlertGroup>
-
iterator
-
size
public int size()- Specified by:
sizein interfaceHasItems<HTMLUListElement,AlertGroup, Alert>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceHasItems<HTMLUListElement,AlertGroup, Alert>
-
clear
public void clear()- Specified by:
clearin interfaceHasItems<HTMLUListElement,AlertGroup, Alert>
-