Package org.patternfly.component.alert
Class Alert
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLDivElement,Alert>
-
- org.patternfly.component.alert.Alert
-
- All Implemented Interfaces:
Attachable,Container<HTMLDivElement,Alert>,Finder<HTMLDivElement>,HasElement<HTMLDivElement,Alert>,HasHTMLElement<HTMLDivElement,Alert>,IsElement<HTMLDivElement>,TypedBuilder<HTMLDivElement,Alert>,Closeable<HTMLDivElement,Alert>,Component,Expandable<HTMLDivElement,Alert>,WithIcon<HTMLDivElement,Alert>,Modifiers.Inline<HTMLDivElement,Alert>,Modifiers.Plain<HTMLDivElement,Alert>
public class Alert extends BaseComponent<HTMLDivElement,Alert> implements Modifiers.Inline<HTMLDivElement,Alert>, Modifiers.Plain<HTMLDivElement,Alert>, Closeable<HTMLDivElement,Alert>, Expandable<HTMLDivElement,Alert>, Attachable, WithIcon<HTMLDivElement,Alert>
An alert is a notification that provides brief information to the user without blocking their workflow.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_TIMEOUT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Alertadd(AlertDescription description)AlertaddActionGroup(AlertActionGroup actionGroup)AlertaddDescription(String description)Wraps the description inside a<p/>element, adds it to aAlertDescriptionand finally adds it to this alert.AlertaddDescription(AlertDescription description)static Alertalert(Severity type, String title)AlertariaCloseLabel(String label)AlertariaLabel(String label)voidattach(MutationRecord mutationRecord)Alertclosable()Alertclosable(CloseHandler<Alert> closeHandler)voidclose(Event event, boolean fireEvent)voidcollapse(boolean fireEvent)voiddetach(MutationRecord mutationRecord)voidexpand(boolean fireEvent)Alertexpandable()Alertexpandable(ToggleHandler<Alert> toggleHandler)Alerticon(Element icon)AlertliveRegion()Make this alert a live region alert.AlertonClose(CloseHandler<Alert> closeHandler)AlertremoveIcon()Alertthat()Alerttimeout()Alerttimeout(int timeout)Alerttruncate()Alerttruncate(int lines)-
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.patternfly.component.Expandable
collapse, expand, expanded, toggle, toggle
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, id, innerHtml, 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 org.patternfly.style.Modifiers.Inline
inline, inline
-
Methods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plain
-
-
-
-
Field Detail
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
attach
public void attach(MutationRecord mutationRecord)
- Specified by:
attachin interfaceAttachable
-
detach
public void detach(MutationRecord mutationRecord)
- Specified by:
detachin interfaceAttachable
-
addActionGroup
public Alert addActionGroup(AlertActionGroup actionGroup)
-
addDescription
public Alert addDescription(String description)
Wraps the description inside a<p/>element, adds it to aAlertDescriptionand 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(Element icon)
- Specified by:
iconin interfaceWithIcon<HTMLDivElement,Alert>
-
removeIcon
public Alert removeIcon()
- Specified by:
removeIconin interfaceWithIcon<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
-
timeout
public Alert timeout()
-
timeout
public Alert timeout(int timeout)
-
truncate
public Alert truncate()
-
truncate
public Alert truncate(int lines)
-
that
public Alert that()
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Alert>
-
onClose
public Alert onClose(CloseHandler<Alert> closeHandler)
- Specified by:
onClosein interfaceCloseable<HTMLDivElement,Alert>
-
close
public void close(Event event, boolean fireEvent)
- Specified by:
closein interfaceCloseable<HTMLDivElement,Alert>
-
collapse
public void collapse(boolean fireEvent)
- Specified by:
collapsein interfaceExpandable<HTMLDivElement,Alert>
-
expand
public void expand(boolean fireEvent)
- Specified by:
expandin interfaceExpandable<HTMLDivElement,Alert>
-
-