Class Alert

java.lang.Object
org.patternfly.component.BaseComponent<elemental2.dom.HTMLDivElement, Alert>
org.patternfly.component.alert.Alert
All Implemented Interfaces:
Attachable, ElementAttributeMethods<elemental2.dom.HTMLDivElement, Alert>, ElementClassListMethods<elemental2.dom.HTMLDivElement, Alert>, ElementConsumerMethods<elemental2.dom.HTMLDivElement, Alert>, ElementContainerMethods<elemental2.dom.HTMLDivElement, Alert>, ElementEventMethods<elemental2.dom.HTMLDivElement, Alert>, ElementIdMethods<elemental2.dom.HTMLDivElement, Alert>, ElementQueryMethods<elemental2.dom.HTMLDivElement>, HTMLElementAttributeMethods<elemental2.dom.HTMLDivElement, Alert>, HTMLElementDataMethods<elemental2.dom.HTMLDivElement, Alert>, HTMLElementStyleMethods<elemental2.dom.HTMLDivElement, Alert>, HTMLElementVisibilityMethods<elemental2.dom.HTMLDivElement, Alert>, IsElement<elemental2.dom.HTMLDivElement>, TypedBuilder<elemental2.dom.HTMLDivElement, Alert>, Closeable<elemental2.dom.HTMLDivElement, Alert>, Component, ComponentIcon<elemental2.dom.HTMLDivElement, Alert>, Expandable<elemental2.dom.HTMLDivElement, Alert>, ComponentContext<elemental2.dom.HTMLDivElement, Alert>, HasIdentifier<elemental2.dom.HTMLDivElement, Alert>, OuiaSupport<elemental2.dom.HTMLDivElement, Alert>, Modifiers.Inline<elemental2.dom.HTMLDivElement, Alert>, Modifiers.Plain<elemental2.dom.HTMLDivElement, Alert>

public class Alert extends BaseComponent<elemental2.dom.HTMLDivElement, Alert> implements Attachable, Closeable<elemental2.dom.HTMLDivElement, Alert>, ComponentContext<elemental2.dom.HTMLDivElement, Alert>, ComponentIcon<elemental2.dom.HTMLDivElement, Alert>, Expandable<elemental2.dom.HTMLDivElement, Alert>, HasIdentifier<elemental2.dom.HTMLDivElement, Alert>, Modifiers.Inline<elemental2.dom.HTMLDivElement, Alert>, Modifiers.Plain<elemental2.dom.HTMLDivElement, Alert>
An alert is a notification that provides brief information to the user without blocking their workflow.
See Also:
  • Field Details

  • Method Details

    • alert

      public static Alert alert(Severity type, String title)
    • alert

      public static Alert alert(Severity type, String identifier, String title)
    • attach

      public void attach(elemental2.dom.MutationRecord mutationRecord)
      Specified by:
      attach in interface Attachable
    • detach

      public void detach(elemental2.dom.MutationRecord mutationRecord)
      Specified by:
      detach in interface Attachable
    • addActionGroup

      public Alert addActionGroup(AlertActionGroup actionGroup)
    • addDescription

      public Alert addDescription(String description)
      Wraps the description inside a <p/> element, adds it to a AlertDescription and finally adds it to this alert. Useful if your description is just a simple string.
    • addDescription

      public Alert addDescription(AlertDescription description)
    • add

      public Alert add(AlertDescription description)
    • closable

      public Alert closable()
    • closable

      public Alert closable(CloseHandler<Alert> closeHandler)
    • icon

      public Alert icon(elemental2.dom.Element icon)
      Specified by:
      icon in interface ComponentIcon<elemental2.dom.HTMLDivElement, Alert>
    • removeIcon

      public Alert removeIcon()
      Specified by:
      removeIcon in interface ComponentIcon<elemental2.dom.HTMLDivElement, Alert>
    • expandable

      public Alert expandable()
    • expandable

      public Alert expandable(ToggleHandler<Alert> toggleHandler)
    • liveRegion

      public Alert liveRegion()
      Make this alert a live region alert. Live region alerts allow you to expose dynamic content changes in a way that can be announced by assistive technologies.

      Set the following ARIA attributes:

      • aria-live: "polite"
      • aria-atomic: false
      See Also:
    • timeout

      public Alert timeout()
    • timeout

      public Alert timeout(int timeout)
    • truncate

      public Alert truncate()
    • truncate

      public Alert truncate(int lines)
    • store

      public <T> Alert store(String key, T value)
      Description copied from interface: ComponentContext
      Stores a value associated with a key.
      Specified by:
      store in interface ComponentContext<elemental2.dom.HTMLDivElement, Alert>
      Type Parameters:
      T - the type of the value being stored
      Parameters:
      key - the key associated with the value
      value - the value to be stored
    • that

      public Alert that()
      Specified by:
      that in interface TypedBuilder<elemental2.dom.HTMLDivElement, Alert>
    • ariaLabel

      public Alert ariaLabel(String label)
    • ariaCloseLabel

      public Alert ariaCloseLabel(String label)
    • onClose

      public Alert onClose(CloseHandler<Alert> closeHandler)
      Specified by:
      onClose in interface Closeable<elemental2.dom.HTMLDivElement, Alert>
    • identifier

      public String identifier()
      Description copied from interface: HasIdentifier
      Retrieves the identifier associated with this component.
      Specified by:
      identifier in interface HasIdentifier<elemental2.dom.HTMLDivElement, Alert>
      Returns:
      the identifier of the component
    • has

      public boolean has(String key)
      Description copied from interface: ComponentContext
      Determines whether a value is stored with the specified key.
      Specified by:
      has in interface ComponentContext<elemental2.dom.HTMLDivElement, Alert>
      Parameters:
      key - the key to check
      Returns:
      true if a value is stored with the specified key, false otherwise
    • get

      public <T> T get(String key)
      Description copied from interface: ComponentContext
      Retrieves the value associated with the given key from the ComponentContext.
      Specified by:
      get in interface ComponentContext<elemental2.dom.HTMLDivElement, Alert>
      Type Parameters:
      T - the type of the value being retrieved
      Parameters:
      key - the key associated with the value
      Returns:
      the value associated with the key, or null if no value is found
    • close

      public void close(elemental2.dom.Event event, boolean fireEvent)
      Specified by:
      close in interface Closeable<elemental2.dom.HTMLDivElement, Alert>
    • collapse

      public void collapse(boolean fireEvent)
      Specified by:
      collapse in interface Expandable<elemental2.dom.HTMLDivElement, Alert>
    • expand

      public void expand(boolean fireEvent)
      Specified by:
      expand in interface Expandable<elemental2.dom.HTMLDivElement, Alert>
    • timestamp

      public double timestamp()