Class AlertViewElement
java.lang.Object
com.foreach.across.modules.web.ui.elements.ContainerViewElement
com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
com.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
com.foreach.across.modules.bootstrapui.elements.AlertViewElement
- All Implemented Interfaces:
com.foreach.across.modules.web.ui.elements.ConfigurableTextViewElement
,com.foreach.across.modules.web.ui.elements.HtmlViewElement
,com.foreach.across.modules.web.ui.MutableViewElement
,com.foreach.across.modules.web.ui.ViewElement
public class AlertViewElement
extends com.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
Represents a Bootstrap alert.
- Since:
- 1.0.0
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.elements.HtmlViewElement
com.foreach.across.modules.web.ui.elements.HtmlViewElement.Functions
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
com.foreach.across.modules.web.ui.MutableViewElement.Functions
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElement
com.foreach.across.modules.web.ui.ViewElement.Wither<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherGetter<T extends com.foreach.across.modules.web.ui.ViewElement,
U extends Object>, com.foreach.across.modules.web.ui.ViewElement.WitherRemover<T extends com.foreach.across.modules.web.ui.ViewElement>, com.foreach.across.modules.web.ui.ViewElement.WitherSetter<T extends com.foreach.across.modules.web.ui.ViewElement> -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
CSS class to add to a link inside an alert box.Fields inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
ELEMENT_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAttributes
(Map<String, Object> attributes) addChild
(com.foreach.across.modules.web.ui.ViewElement element) addChildren
(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) addCssClass
(String... cssClass) addFirstChild
(com.foreach.across.modules.web.ui.ViewElement element) <U extends com.foreach.across.modules.web.ui.ViewElement>
AlertViewElementapplyUnsafe
(Consumer<U> consumer) List<com.foreach.across.modules.web.ui.ViewElement>
Set the label for the close button if the alert is dismissible.getStyle()
boolean
boolean
remove
(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) removeAttribute
(String attributeName) removeCssClass
(String... cssClass) set
(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) setAttribute
(String attributeName, Object attributeValue) setAttributes
(Map<String, Object> attributes) setCloseLabel
(String closeLabel) Set the label for the close button if the alert is dismissible.setCustomTemplate
(String customTemplate) setDismissible
(boolean dismissible) Should the alert be dismissible or not?protected AlertViewElement
setElementType
(String elementType) protected AlertViewElement
setTagName
(String tagName) Methods inherited from class com.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
getText
Methods inherited from class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
get, getAttribute, getAttribute, getAttributes, getHtmlId, getTagName, hasAttribute, hasCssClass, returnIfType
Methods inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
elementStream, find, find, findAll, findAll, findAll, findOrSelf, findOrSelf, flatStream, getCustomTemplate, getElementType, getName, removeAllFromTree, removeChild, removeFromTree, removeFromTree
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, getCustomTemplate, getElementType, getName, matches
-
Field Details
-
CSS_LINK
CSS class to add to a link inside an alert box.- See Also:
-
-
Constructor Details
-
AlertViewElement
public AlertViewElement()
-
-
Method Details
-
setStyle
-
setDismissible
Should the alert be dismissible or not? If so a button will be added.- Parameters:
dismissible
- should the button be added
-
isDismissible
public boolean isDismissible() -
hasChildren
public boolean hasChildren()- Overrides:
hasChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
getChildren
- Overrides:
getChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setTagName
- Overrides:
setTagName
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setHtmlId
- Specified by:
setHtmlId
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setHtmlId
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
addCssClass
- Specified by:
addCssClass
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
addCssClass
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
removeCssClass
- Specified by:
removeCssClass
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
removeCssClass
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setAttributes
- Specified by:
setAttributes
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setAttributes
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setAttribute
- Specified by:
setAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
setAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
addAttributes
- Specified by:
addAttributes
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
addAttributes
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
removeAttribute
- Specified by:
removeAttribute
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Overrides:
removeAttribute
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setName
- Specified by:
setName
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Overrides:
setName
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setCustomTemplate
- Specified by:
setCustomTemplate
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Overrides:
setCustomTemplate
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setElementType
- Overrides:
setElementType
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
addChild
- Overrides:
addChild
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
addChildren
public AlertViewElement addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) - Overrides:
addChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
addFirstChild
- Overrides:
addFirstChild
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
clearChildren
- Overrides:
clearChildren
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
apply
public AlertViewElement apply(Consumer<com.foreach.across.modules.web.ui.elements.ContainerViewElement> consumer) - Overrides:
apply
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
applyUnsafe
public <U extends com.foreach.across.modules.web.ui.ViewElement> AlertViewElement applyUnsafe(Consumer<U> consumer) - Overrides:
applyUnsafe
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
setText
- Specified by:
setText
in interfacecom.foreach.across.modules.web.ui.elements.ConfigurableTextViewElement
- Overrides:
setText
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
set
- Specified by:
set
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Specified by:
set
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Specified by:
set
in interfacecom.foreach.across.modules.web.ui.ViewElement
- Overrides:
set
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
remove
public AlertViewElement remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) - Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement
- Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.MutableViewElement
- Specified by:
remove
in interfacecom.foreach.across.modules.web.ui.ViewElement
- Overrides:
remove
in classcom.foreach.across.modules.web.ui.elements.AbstractTextNodeViewElement
-
getCloseLabel
Set the label for the close button if the alert is dismissible. -
setCloseLabel
Set the label for the close button if the alert is dismissible.- Returns:
this
.
-
getStyle
-