Class HTML.Tag

java.lang.Object
javax.swing.text.html.HTML.Tag
Direct Known Subclasses:
HTML.UnknownTag
Enclosing class:
HTML

public static class HTML.Tag extends Object
Typesafe enumeration for an HTML tag. Although the set of HTML tags is a closed set, we have left the set open so that people can add their own tag types to their custom parser and still communicate to the reader.
  • Field Details Link icon

    • A Link icon

      public static final HTML.Tag A
      Tag <a>
    • ADDRESS Link icon

      public static final HTML.Tag ADDRESS
      Tag <address>
    • APPLET Link icon

      public static final HTML.Tag APPLET
      Tag <applet>
    • AREA Link icon

      public static final HTML.Tag AREA
      Tag <area>
    • B Link icon

      public static final HTML.Tag B
      Tag <b>
    • BASE Link icon

      public static final HTML.Tag BASE
      Tag <base>
    • BASEFONT Link icon

      public static final HTML.Tag BASEFONT
      Tag <basefont>
    • BIG Link icon

      public static final HTML.Tag BIG
      Tag <big>
    • BLOCKQUOTE Link icon

      public static final HTML.Tag BLOCKQUOTE
      Tag <blockquote>
    • BODY Link icon

      public static final HTML.Tag BODY
      Tag <body>
    • BR Link icon

      public static final HTML.Tag BR
      Tag <br>
    • CAPTION Link icon

      public static final HTML.Tag CAPTION
      Tag <caption>
    • CENTER Link icon

      public static final HTML.Tag CENTER
      Tag <center>
    • CITE Link icon

      public static final HTML.Tag CITE
      Tag <cite>
    • CODE Link icon

      public static final HTML.Tag CODE
      Tag <code>
    • DD Link icon

      public static final HTML.Tag DD
      Tag <dd>
    • DFN Link icon

      public static final HTML.Tag DFN
      Tag <dfn>
    • DIR Link icon

      public static final HTML.Tag DIR
      Tag <dir>
    • DIV Link icon

      public static final HTML.Tag DIV
      Tag <div>
    • DL Link icon

      public static final HTML.Tag DL
      Tag <dl>
    • DT Link icon

      public static final HTML.Tag DT
      Tag <dt>
    • EM Link icon

      public static final HTML.Tag EM
      Tag <em>
    • FONT Link icon

      public static final HTML.Tag FONT
      Tag <font>
    • FORM Link icon

      public static final HTML.Tag FORM
      Tag <form>
    • FRAME Link icon

      public static final HTML.Tag FRAME
      Tag <frame>
    • FRAMESET Link icon

      public static final HTML.Tag FRAMESET
      Tag <frameset>
    • H1 Link icon

      public static final HTML.Tag H1
      Tag <h1>
    • H2 Link icon

      public static final HTML.Tag H2
      Tag <h2>
    • H3 Link icon

      public static final HTML.Tag H3
      Tag <h3>
    • H4 Link icon

      public static final HTML.Tag H4
      Tag <h4>
    • H5 Link icon

      public static final HTML.Tag H5
      Tag <h5>
    • H6 Link icon

      public static final HTML.Tag H6
      Tag <h6>
    • HR Link icon

      public static final HTML.Tag HR
      Tag <hr>
    • HTML Link icon

      public static final HTML.Tag HTML
      Tag <html>
    • I Link icon

      public static final HTML.Tag I
      Tag <i>
    • IMG Link icon

      public static final HTML.Tag IMG
      Tag <img>
    • INPUT Link icon

      public static final HTML.Tag INPUT
      Tag <input>
    • ISINDEX Link icon

      public static final HTML.Tag ISINDEX
      Tag <isindex>
    • KBD Link icon

      public static final HTML.Tag KBD
      Tag <kbd>
    • LI Link icon

      public static final HTML.Tag LI
      Tag <li>
    • MAP Link icon

      public static final HTML.Tag MAP
      Tag <map>
    • META Link icon

      public static final HTML.Tag META
      Tag <meta>
    • NOFRAMES Link icon

      public static final HTML.Tag NOFRAMES
      Tag <noframes>
    • OBJECT Link icon

      public static final HTML.Tag OBJECT
      Tag <object>
    • OL Link icon

      public static final HTML.Tag OL
      Tag <ol>
    • OPTION Link icon

      public static final HTML.Tag OPTION
      Tag <option>
    • P Link icon

      public static final HTML.Tag P
      Tag <p>
    • PARAM Link icon

      public static final HTML.Tag PARAM
      Tag <param>
    • PRE Link icon

      public static final HTML.Tag PRE
      Tag <pre>
    • SAMP Link icon

      public static final HTML.Tag SAMP
      Tag <samp>
    • SCRIPT Link icon

      public static final HTML.Tag SCRIPT
      Tag <script>
    • SELECT Link icon

      public static final HTML.Tag SELECT
      Tag <select>
    • SMALL Link icon

      public static final HTML.Tag SMALL
      Tag <small>
    • SPAN Link icon

      public static final HTML.Tag SPAN
      Tag <span>
    • STRIKE Link icon

      public static final HTML.Tag STRIKE
      Tag <strike>
    • S Link icon

      public static final HTML.Tag S
      Tag <s>
    • STRONG Link icon

      public static final HTML.Tag STRONG
      Tag <strong>
    • STYLE Link icon

      public static final HTML.Tag STYLE
      Tag <style>
    • SUB Link icon

      public static final HTML.Tag SUB
      Tag <sub>
    • SUP Link icon

      public static final HTML.Tag SUP
      Tag <sup>
    • TABLE Link icon

      public static final HTML.Tag TABLE
      Tag <table>
    • TD Link icon

      public static final HTML.Tag TD
      Tag <td>
    • TEXTAREA Link icon

      public static final HTML.Tag TEXTAREA
      Tag <textarea>
    • TH Link icon

      public static final HTML.Tag TH
      Tag <th>
    • TITLE Link icon

      public static final HTML.Tag TITLE
      Tag <title>
    • TR Link icon

      public static final HTML.Tag TR
      Tag <tr>
    • TT Link icon

      public static final HTML.Tag TT
      Tag <tt>
    • U Link icon

      public static final HTML.Tag U
      Tag <u>
    • UL Link icon

      public static final HTML.Tag UL
      Tag <ul>
    • VAR Link icon

      public static final HTML.Tag VAR
      Tag <var>
    • IMPLIED Link icon

      public static final HTML.Tag IMPLIED
      All text content must be in a paragraph element. If a paragraph didn't exist when content was encountered, a paragraph is manufactured.

      This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

    • CONTENT Link icon

      public static final HTML.Tag CONTENT
      All text content is labeled with this tag.

      This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

    • COMMENT Link icon

      public static final HTML.Tag COMMENT
      All comments are labeled with this tag.

      This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.

  • Constructor Details Link icon

    • Tag Link icon

      public Tag()
      Constructs a Tag.
      Since:
      1.3
    • Tag Link icon

      protected Tag(String id)
      Creates a new Tag with the specified id, and with causesBreak and isBlock set to false.
      Parameters:
      id - the id of the new tag
    • Tag Link icon

      protected Tag(String id, boolean causesBreak, boolean isBlock)
      Creates a new Tag with the specified id; causesBreak and isBlock are defined by the user.
      Parameters:
      id - the id of the new tag
      causesBreak - true if this tag causes a break to the flow of data
      isBlock - true if the tag is used to add structure to a document
  • Method Details Link icon

    • isBlock Link icon

      public boolean isBlock()
      Returns true if this tag is a block tag, which is a tag used to add structure to a document.
      Returns:
      true if this tag is a block tag, otherwise returns false
    • breaksFlow Link icon

      public boolean breaksFlow()
      Returns true if this tag causes a line break to the flow of data, otherwise returns false.
      Returns:
      true if this tag causes a line break to the flow of data, otherwise returns false
    • isPreformatted Link icon

      public boolean isPreformatted()
      Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA.
      Returns:
      true if this tag is pre-formatted, otherwise returns false
    • toString Link icon

      public String toString()
      Returns the string representation of the tag.
      Overrides:
      toString in class Object
      Returns:
      the String representation of the tag