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> TRetrieves the value associated with the given key from the ComponentContext.booleanDetermines whether a value is stored with the specified key.Retrieves the identifier associated with this component.Make this alert a live region alert.onClose(CloseHandler<Alert> closeHandler) <T> AlertStores a value associated with a key.that()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
Description copied from interface:ComponentContextStores a value associated with a key.- Specified by:
storein interfaceComponentContext<HTMLDivElement, Alert>- Type Parameters:
T- the type of the value being stored- Parameters:
key- the key associated with the valuevalue- the value to be stored
-
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
Description copied from interface:ComponentContextDetermines whether a value is stored with the specified key.- Specified by:
hasin interfaceComponentContext<HTMLDivElement, Alert>- Parameters:
key- the key to check- Returns:
- true if a value is stored with the specified key, false otherwise
-
get
Description copied from interface:ComponentContextRetrieves the value associated with the given key from the ComponentContext.- Specified by:
getin interfaceComponentContext<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
- 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()
-