Package org.spiderwiz.zutils
Class ZHtml.TextNode
java.lang.Object
org.spiderwiz.zutils.ZHtml.Node
org.spiderwiz.zutils.ZHtml.TextNode
- Direct Known Subclasses:
ZHtml.Anchor
,ZHtml.Div
,ZHtml.Paragraph
- Enclosing class:
- ZHtml
public class ZHtml.TextNode extends ZHtml.Node
Represents a generic node that can be incrementally loaded with anything from plain text to nodes of other types.
-
Method Summary
Modifier and Type Method Description ZHtml.TextNode
addBoldText(String text)
Appends inner bold text (b
tag) to the node.ZHtml.TextNode
addLineBreak()
Appends an inner line break (<br/>
) to the node.ZHtml.TextNode
addNode(ZHtml.Node node)
Appends an inner node to this node.ZHtml.TextNode
addText(String text)
Appends inner text to the node.Methods inherited from class org.spiderwiz.zutils.ZHtml.Node
addStyle, createAnchor, createParagraph, createTextNode
-
Method Details
-
addText
Appends inner text to the node.The text can contain any text, including special HTML characters. The text is HTML-escaped when the node is converted to HTML.
- Parameters:
text
- text to append to the node. If null nothing is appended.- Returns:
- the node.
-
addBoldText
Appends inner bold text (b
tag) to the node.The text can contain any text, including special HTML characters. The text is HTML-escaped when the node is converted to HTML.
- Parameters:
text
- text to append to the node. If null nothing is appended.- Returns:
- the node.
-
addNode
Appends an inner node to this node.- Parameters:
node
- the node to append.- Returns:
- the node.
-
addLineBreak
Appends an inner line break (<br/>
) to the node.- Returns:
- the node.
-