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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic AlertGroup
alertGroup
(AlertGroupType type) Creates a new alert group of the given type without timeout.static AlertGroup
alertGroup
(AlertGroupType type, int timeout) Creates a new alert group of the given type and timeout.void
clear()
boolean
isEmpty()
iterator()
int
size()
that()
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
Methods 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, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods 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.toast
the 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.toast
the 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:
add
in interfaceHasItems<HTMLUListElement,
AlertGroup, Alert>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLUListElement,
AlertGroup>
-
iterator
-
size
public int size()- Specified by:
size
in interfaceHasItems<HTMLUListElement,
AlertGroup, Alert>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceHasItems<HTMLUListElement,
AlertGroup, Alert>
-
clear
public void clear()- Specified by:
clear
in interfaceHasItems<HTMLUListElement,
AlertGroup, Alert>
-