Class TooltipViewElement
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.NodeViewElement
com.foreach.across.modules.bootstrapui.elements.tooltip.TooltipViewElement
- 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 TooltipViewElement
extends com.foreach.across.modules.web.ui.elements.NodeViewElement
implements com.foreach.across.modules.web.ui.elements.ConfigurableTextViewElement
Represents a default tooltip view element, rendered as a link with a
question mark icon, where the tooltip text is shown when hovering.
Uses Bootstrap tooltip support. This is a convenience class as a tooltip can be
pretty much any node with the right HTML attributes set.
- Since:
- 2.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.FunctionsNested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
com.foreach.across.modules.web.ui.MutableViewElement.FunctionsNested 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
Fields inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
ELEMENT_TYPE -
Constructor Summary
Constructors -
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>
TooltipViewElementapplyUnsafe(Consumer<U> consumer) List<com.foreach.across.modules.web.ui.ViewElement>com.foreach.across.modules.web.ui.ViewElementgetIcon()getText()booleanremove(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) setCustomTemplate(String customTemplate) protected TooltipViewElementsetElementType(String elementType) setEscapeHtml(boolean escapeHtml) Should HTML text be escaped.setIcon(com.foreach.across.modules.web.ui.ViewElement icon) Set the icon view element for this tooltip.setTagName(String tagName) Set the tooltip text.Methods inherited from class com.foreach.across.modules.web.ui.elements.AbstractNodeViewElement
get, getAttribute, getAttribute, getAttributes, getHtmlId, getTagName, hasAttribute, hasCssClass, returnIfTypeMethods inherited from class com.foreach.across.modules.web.ui.elements.ContainerViewElement
elementStream, find, find, findAll, findAll, findAll, findOrSelf, findOrSelf, flatStream, getCustomTemplate, getElementType, getName, hasChildren, removeAllFromTree, removeChild, removeFromTree, removeFromTreeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, getCustomTemplate, getElementType, getName, matches
-
Constructor Details
-
TooltipViewElement
public TooltipViewElement()
-
-
Method Details
-
isEscapeHtml
public boolean isEscapeHtml() -
setEscapeHtml
Should HTML text be escaped. By default HTML is supported.- Parameters:
escapeHtml- should HTML text be escaped
-
setText
Set the tooltip text.- Specified by:
setTextin interfacecom.foreach.across.modules.web.ui.elements.ConfigurableTextViewElement- Parameters:
text- to set
-
getText
- Specified by:
getTextin interfacecom.foreach.across.modules.web.ui.elements.ConfigurableTextViewElement
-
getChildren
- Overrides:
getChildrenin classcom.foreach.across.modules.web.ui.elements.ContainerViewElement
-
setTagName
- Overrides:
setTagNamein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setHtmlId
- Specified by:
setHtmlIdin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setHtmlIdin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
addCssClass
- Specified by:
addCssClassin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
addCssClassin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
removeCssClass
- Specified by:
removeCssClassin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
removeCssClassin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setAttributes
- Specified by:
setAttributesin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setAttributesin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setAttribute
- Specified by:
setAttributein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
setAttributein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
addAttributes
- Specified by:
addAttributesin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
addAttributesin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
removeAttribute
- Specified by:
removeAttributein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Overrides:
removeAttributein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setName
- Specified by:
setNamein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Overrides:
setNamein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setCustomTemplate
- Specified by:
setCustomTemplatein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Overrides:
setCustomTemplatein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
setElementType
- Overrides:
setElementTypein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
addChild
- Overrides:
addChildin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
addChildren
public TooltipViewElement addChildren(Collection<? extends com.foreach.across.modules.web.ui.ViewElement> elements) - Overrides:
addChildrenin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
addFirstChild
- Overrides:
addFirstChildin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
clearChildren
- Overrides:
clearChildrenin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
apply
public TooltipViewElement apply(Consumer<com.foreach.across.modules.web.ui.elements.ContainerViewElement> consumer) - Overrides:
applyin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
applyUnsafe
public <U extends com.foreach.across.modules.web.ui.ViewElement> TooltipViewElement applyUnsafe(Consumer<U> consumer) - Overrides:
applyUnsafein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
set
public TooltipViewElement set(com.foreach.across.modules.web.ui.ViewElement.WitherSetter... setters) - Specified by:
setin interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Specified by:
setin interfacecom.foreach.across.modules.web.ui.MutableViewElement- Specified by:
setin interfacecom.foreach.across.modules.web.ui.ViewElement- Overrides:
setin classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
remove
public TooltipViewElement remove(com.foreach.across.modules.web.ui.ViewElement.WitherRemover... functions) - Specified by:
removein interfacecom.foreach.across.modules.web.ui.elements.HtmlViewElement- Specified by:
removein interfacecom.foreach.across.modules.web.ui.MutableViewElement- Specified by:
removein interfacecom.foreach.across.modules.web.ui.ViewElement- Overrides:
removein classcom.foreach.across.modules.web.ui.elements.NodeViewElement
-
getIcon
public com.foreach.across.modules.web.ui.ViewElement getIcon() -
setIcon
Set the icon view element for this tooltip. This will always be the first child of the tooltip node.- Returns:
this.
-