Package org.patternfly.component.alert
Class Alert
- java.lang.Object
-
- org.patternfly.component.BaseComponent<HTMLDivElement,Alert>
-
- org.patternfly.component.alert.Alert
-
- All Implemented Interfaces:
Container<HTMLDivElement,Alert>,Finder<HTMLDivElement>,HasElement<HTMLDivElement,Alert>,HasHTMLElement<HTMLDivElement,Alert>,IsElement<HTMLDivElement>,TypedBuilder<HTMLDivElement,Alert>,Component,Modifiers.Inline<HTMLDivElement,Alert>
public class Alert extends BaseComponent<HTMLDivElement,Alert> implements Modifiers.Inline<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 StringARIA_CLOSE_BUTTON
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlertaddAction(Button action)Wraps the action inside aAlertActionGroupand adds it to this alert.AlertaddActionGroup(AlertActionGroup actionGroup)AlertaddDescription(String description)Wraps the description inside a<p> <p> <p> <p/>element, adds it to aAlertDescriptionand finally adds it to this alert.AlertaddDescription(AlertDescription description)AlertariaCloseLabel(String label)AlertariaLabel(String label)Alertclosable()Alertclosable(Callback callback)voidclose()static Alertcustom(String title)static Alertdanger(String title)static Alertinfo(String title)AlertonClose(Callback callback)static Alertsuccess(String title)Alertthat()Alerttruncate()Alerttruncate(int lines)static Alertwarning(String title)-
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, addAll, addAll, addAll, addAll, addAll
-
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, css, id, id, innerHtml, on, textContent, toggle, toggle, toggle
-
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, title
-
Methods inherited from interface org.patternfly.core.Modifiers.Inline
inline, inline
-
-
-
-
Field Detail
-
ARIA_CLOSE_BUTTON
public static final String ARIA_CLOSE_BUTTON
- See Also:
- Constant Field Values
-
-
Method Detail
-
that
public Alert that()
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Alert>
-
addAction
public Alert addAction(Button action)
Wraps the action inside aAlertActionGroupand adds it to this alert. Useful if you only want to add a single action.
-
addActionGroup
public Alert addActionGroup(AlertActionGroup actionGroup)
-
addDescription
public Alert addDescription(String description)
Wraps the description inside a<p> <p> <p> <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)
-
close
public void close()
-
closable
public Alert closable()
-
truncate
public Alert truncate()
-
truncate
public Alert truncate(int lines)
-
-