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.
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(AlertDescription description) addActionGroup
(AlertActionGroup actionGroup) addDescription
(String description) Wraps the description inside a<p/>
element, adds it to aAlertDescription
and finally adds it to this alert.addDescription
(AlertDescription description) static Alert
static Alert
ariaCloseLabel
(String label) void
attach
(MutationRecord mutationRecord) closable()
closable
(CloseHandler<Alert> closeHandler) void
void
collapse
(boolean fireEvent) void
detach
(MutationRecord mutationRecord) void
expand
(boolean fireEvent) expandable
(ToggleHandler<Alert> toggleHandler) <T> T
boolean
Make this alert a live region alert.onClose
(CloseHandler<Alert> closeHandler) <T> Alert
that()
timeout()
timeout
(int timeout) truncate()
truncate
(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.patternfly.core.ComponentContext
get, get
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, 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 org.patternfly.style.Modifiers.Inline
inline, inline
Methods 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:
attach
in interfaceAttachable
-
detach
- Specified by:
detach
in interfaceAttachable
-
addActionGroup
-
addDescription
Wraps the description inside a<p/>
element, adds it to aAlertDescription
and finally adds it to this alert. Useful if your description is just a simple string. -
addDescription
-
add
-
closable
-
closable
-
icon
- Specified by:
icon
in interfaceWithIcon<HTMLDivElement,
Alert>
-
removeIcon
- Specified by:
removeIcon
in 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
- See Also:
-
timeout
-
timeout
-
truncate
-
truncate
-
store
- Specified by:
store
in interfaceComponentContext<HTMLDivElement,
Alert>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLDivElement,
Alert>
-
ariaLabel
-
ariaCloseLabel
-
onClose
- Specified by:
onClose
in interfaceCloseable<HTMLDivElement,
Alert>
-
identifier
- Specified by:
identifier
in interfaceWithIdentifier<HTMLDivElement,
Alert>
-
has
- Specified by:
has
in interfaceComponentContext<HTMLDivElement,
Alert>
-
get
- Specified by:
get
in interfaceComponentContext<HTMLDivElement,
Alert>
-
close
- Specified by:
close
in interfaceCloseable<HTMLDivElement,
Alert>
-
collapse
public void collapse(boolean fireEvent) - Specified by:
collapse
in interfaceExpandable<HTMLDivElement,
Alert>
-
expand
public void expand(boolean fireEvent) - Specified by:
expand
in interfaceExpandable<HTMLDivElement,
Alert>
-