Class Alert
- All Implemented Interfaces:
Attachable, ElementAttributeMethods<HTMLDivElement, Alert>, ElementClassListMethods<HTMLDivElement, Alert>, ElementConsumerMethods<HTMLDivElement, Alert>, ElementContainerMethods<HTMLDivElement, Alert>, ElementEventMethods<HTMLDivElement, Alert>, ElementIdMethods<HTMLDivElement, Alert>, ElementQueryMethods<HTMLDivElement>, HTMLElementAttributeMethods<HTMLDivElement, Alert>, HTMLElementDataMethods<HTMLDivElement, Alert>, HTMLElementStyleMethods<HTMLDivElement, Alert>, HTMLElementVisibilityMethods<HTMLDivElement, Alert>, IsElement<HTMLDivElement>, TypedBuilder<HTMLDivElement, Alert>, Closeable<HTMLDivElement, Alert>, Component, ComponentIcon<HTMLDivElement, Alert>, Expandable<HTMLDivElement, Alert>, HasIdentifier<HTMLDivElement, Alert>, ComponentContext<HTMLDivElement, Alert>, Modifiers.Inline<HTMLDivElement, Alert>, Modifiers.Plain<HTMLDivElement, Alert>
public class Alert
extends BaseComponent<HTMLDivElement, Alert>
implements Closeable<HTMLDivElement, Alert>, ComponentContext<HTMLDivElement, Alert>, ComponentIcon<HTMLDivElement, Alert>, Expandable<HTMLDivElement, Alert>, Attachable, HasIdentifier<HTMLDivElement, Alert>, Modifiers.Inline<HTMLDivElement, Alert>, Modifiers.Plain<HTMLDivElement, Alert>
An alert is a notification that provides brief information to the user without blocking their workflow.
- See Also:
-
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> TbooleanRetrieves the identifier associated with this component.Make this alert a live region alert.onClose(CloseHandler<Alert> closeHandler) <T> Alertthat()timeout()timeout(int timeout) doubletruncate()truncate(int lines) Methods inherited from class BaseComponent
componentType, element, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComponentContext
get, getMethods inherited from interface ComponentIcon
iconMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Modifiers.Inline
inline, inlineMethods inherited from interface 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 interfaceComponentIcon<HTMLDivElement, Alert>
-
removeIcon
- Specified by:
removeIconin interfaceComponentIcon<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:
storein interfaceComponentContext<HTMLDivElement, Alert>
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement, Alert>
-
ariaLabel
-
ariaCloseLabel
-
onClose
- Specified by:
onClosein interfaceCloseable<HTMLDivElement, Alert>
-
identifier
Description copied from interface:HasIdentifierRetrieves the identifier associated with this component.- Specified by:
identifierin interfaceHasIdentifier<HTMLDivElement, Alert>- Returns:
- the identifier of the component
-
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>
-
timestamp
public double timestamp()
-