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 Details

    • addText

      public ZHtml.TextNode addText​(String text)
      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

      public ZHtml.TextNode addBoldText​(String text)
      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

      public ZHtml.TextNode addNode​(ZHtml.Node node)
      Appends an inner node to this node.
      Parameters:
      node - the node to append.
      Returns:
      the node.
    • addLineBreak

      public ZHtml.TextNode addLineBreak()
      Appends an inner line break (<br/>) to the node.
      Returns:
      the node.