Package org.patternfly.component.alert
Class 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> WithIdentifier<HTMLDivElement,,Alert> ComponentContext<HTMLDivElement,,Alert> Modifiers.Inline<HTMLDivElement,,Alert> Modifiers.Plain<HTMLDivElement,Alert>
public class Alert
extends BaseComponent<HTMLDivElement,Alert>
implements ComponentContext<HTMLDivElement,Alert>, Modifiers.Inline<HTMLDivElement,Alert>, Modifiers.Plain<HTMLDivElement,Alert>, Closeable<HTMLDivElement,Alert>, Expandable<HTMLDivElement,Alert>, Attachable, WithIdentifier<HTMLDivElement,Alert>, WithIcon<HTMLDivElement,Alert>
An alert is a notification that provides brief information to the user without blocking their workflow.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionadd(AlertDescription description) addActionGroup(AlertActionGroup actionGroup) addDescription(String description) Wraps the description inside a<p/>element, adds it to aAlertDescriptionand finally adds it to this alert.addDescription(AlertDescription description) static Alertstatic AlertariaCloseLabel(String label) voidattach(MutationRecord mutationRecord) closable()closable(CloseHandler<Alert> closeHandler) voidvoidcollapse(boolean fireEvent) voiddetach(MutationRecord mutationRecord) voidexpand(boolean fireEvent) expandable(ToggleHandler<Alert> toggleHandler) <T> TbooleanMake this alert a live region alert.onClose(CloseHandler<Alert> closeHandler) <T> Alertthat()timeout()timeout(int timeout) truncate()truncate(int lines) 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.patternfly.core.ComponentContext
get, getMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.patternfly.component.Expandable
collapse, expand, expanded, toggle, toggleMethods 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 org.patternfly.style.Modifiers.Inline
inline, inlineMethods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plain
-
Field Details
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT- See Also:
-
-
Method Details
-
alert
-
alert
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
addActionGroup
-
addDescription
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
-
add
-
closable
-
closable
-
icon
- Specified by:
iconin interfaceWithIcon<HTMLDivElement,Alert>
-
removeIcon
- Specified by:
removeIconin interfaceWithIcon<HTMLDivElement,Alert>
-
expandable
-
expandable
-
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
-
timeout
-
truncate
-
truncate
-
store
- Specified by:
storein interfaceComponentContext<HTMLDivElement,Alert>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Alert>
-
ariaLabel
-
ariaCloseLabel
-
onClose
- Specified by:
onClosein interfaceCloseable<HTMLDivElement,Alert>
-
identifier
- Specified by:
identifierin interfaceWithIdentifier<HTMLDivElement,Alert>
-
has
- Specified by:
hasin interfaceComponentContext<HTMLDivElement,Alert>
-
get
- Specified by:
getin interfaceComponentContext<HTMLDivElement,Alert>
-
close
- 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>
-