Class AlertGroup

All Implemented Interfaces:
Container<HTMLUListElement,AlertGroup>, Finder<HTMLUListElement>, HasElement<HTMLUListElement,AlertGroup>, HasHTMLElement<HTMLUListElement,AlertGroup>, IsElement<HTMLUListElement>, TypedBuilder<HTMLUListElement,AlertGroup>, Component

public class AlertGroup extends BaseComponent<HTMLUListElement,AlertGroup>
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 Details

    • alertGroup

      public static AlertGroup alertGroup(AlertGroupType type)
      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

      public static AlertGroup alertGroup(AlertGroupType type, int timeout)
      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).

    • addAlerts

      public <T> AlertGroup addAlerts(Iterable<T> items, Function<T,Alert> display)
    • addAlert

      public AlertGroup addAlert(Alert alert)
    • add

      public AlertGroup add(Alert alert)
    • that

      public AlertGroup that()