java.lang.Object
javax.swing.text.html.HTML.Tag
- Direct Known Subclasses:
HTML.UnknownTag
- Enclosing class:
HTML
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 Summary
Modifier and TypeFieldDescriptionstatic final HTML.Tag
Tag <a>static final HTML.Tag
Tag <address>static final HTML.Tag
Tag <applet>static final HTML.Tag
Tag <area>static final HTML.Tag
Tag <b>static final HTML.Tag
Tag <base>static final HTML.Tag
Tag <basefont>static final HTML.Tag
Tag <big>static final HTML.Tag
Tag <blockquote>static final HTML.Tag
Tag <body>static final HTML.Tag
Tag <br>static final HTML.Tag
Tag <caption>static final HTML.Tag
Tag <center>static final HTML.Tag
Tag <cite>static final HTML.Tag
Tag <code>static final HTML.Tag
All comments are labeled with this tag.static final HTML.Tag
All text content is labeled with this tag.static final HTML.Tag
Tag <dd>static final HTML.Tag
Tag <dfn>static final HTML.Tag
Tag <dir>static final HTML.Tag
Tag <div>static final HTML.Tag
Tag <dl>static final HTML.Tag
Tag <dt>static final HTML.Tag
Tag <em>static final HTML.Tag
Tag <font>static final HTML.Tag
Tag <form>static final HTML.Tag
Tag <frame>static final HTML.Tag
Tag <frameset>static final HTML.Tag
Tag <h1>static final HTML.Tag
Tag <h2>static final HTML.Tag
Tag <h3>static final HTML.Tag
Tag <h4>static final HTML.Tag
Tag <h5>static final HTML.Tag
Tag <h6>static final HTML.Tag
Tag <head>static final HTML.Tag
Tag <hr>static final HTML.Tag
Tag <html>static final HTML.Tag
Tag <i>static final HTML.Tag
Tag <img>static final HTML.Tag
All text content must be in a paragraph element.static final HTML.Tag
Tag <input>static final HTML.Tag
Tag <isindex>static final HTML.Tag
Tag <kbd>static final HTML.Tag
Tag <li>static final HTML.Tag
Tag <link>static final HTML.Tag
Tag <map>static final HTML.Tag
Tag <menu>static final HTML.Tag
Tag <meta>static final HTML.Tag
Tag <noframes>static final HTML.Tag
Tag <object>static final HTML.Tag
Tag <ol>static final HTML.Tag
Tag <option>static final HTML.Tag
Tag <p>static final HTML.Tag
Tag <param>static final HTML.Tag
Tag <pre>static final HTML.Tag
Tag <s>static final HTML.Tag
Tag <samp>static final HTML.Tag
Tag <script>static final HTML.Tag
Tag <select>static final HTML.Tag
Tag <small>static final HTML.Tag
Tag <span>static final HTML.Tag
Tag <strike>static final HTML.Tag
Tag <strong>static final HTML.Tag
Tag <style>static final HTML.Tag
Tag <sub>static final HTML.Tag
Tag <sup>static final HTML.Tag
Tag <table>static final HTML.Tag
Tag <td>static final HTML.Tag
Tag <textarea>static final HTML.Tag
Tag <th>static final HTML.Tag
Tag <title>static final HTML.Tag
Tag <tr>static final HTML.Tag
Tag <tt>static final HTML.Tag
Tag <u>static final HTML.Tag
Tag <ul>static final HTML.Tag
Tag <var> -
Constructor Summary
ModifierConstructorDescriptionTag()
Constructs aTag
.protected
Creates a newTag
with the specifiedid
, and withcausesBreak
andisBlock
set tofalse
.protected
Creates a newTag
with the specifiedid
;causesBreak
andisBlock
are defined by the user. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this tag causes a line break to the flow of data, otherwise returnsfalse
.boolean
isBlock()
Returnstrue
if this tag is a block tag, which is a tag used to add structure to a document.boolean
Returnstrue
if this tag is pre-formatted, which is true if the tag is eitherPRE
orTEXTAREA
.toString()
Returns the string representation of the tag.
-
Field Details
-
A
Tag <a> -
ADDRESS
Tag <address> -
APPLET
Tag <applet> -
AREA
Tag <area> -
B
Tag <b> -
BASE
Tag <base> -
BASEFONT
Tag <basefont> -
BIG
Tag <big> -
BLOCKQUOTE
Tag <blockquote> -
BODY
Tag <body> -
BR
Tag <br> -
CAPTION
Tag <caption> -
CENTER
Tag <center> -
CITE
Tag <cite> -
CODE
Tag <code> -
DD
Tag <dd> -
DFN
Tag <dfn> -
DIR
Tag <dir> -
DIV
Tag <div> -
DL
Tag <dl> -
DT
Tag <dt> -
EM
Tag <em> -
FONT
Tag <font> -
FORM
Tag <form> -
FRAME
Tag <frame> -
FRAMESET
Tag <frameset> -
H1
Tag <h1> -
H2
Tag <h2> -
H3
Tag <h3> -
H4
Tag <h4> -
H5
Tag <h5> -
H6
Tag <h6> -
HEAD
Tag <head> -
HR
Tag <hr> -
HTML
Tag <html> -
I
Tag <i> -
IMG
Tag <img> -
INPUT
Tag <input> -
ISINDEX
Tag <isindex> -
KBD
Tag <kbd> -
LI
Tag <li> -
LINK
Tag <link> -
MAP
Tag <map> -
MENU
Tag <menu> -
META
Tag <meta> -
NOFRAMES
Tag <noframes> -
OBJECT
Tag <object> -
OL
Tag <ol> -
OPTION
Tag <option> -
P
Tag <p> -
PARAM
Tag <param> -
PRE
Tag <pre> -
SAMP
Tag <samp> -
SCRIPT
Tag <script> -
SELECT
Tag <select> -
SMALL
Tag <small> -
SPAN
Tag <span> -
STRIKE
Tag <strike> -
S
Tag <s> -
STRONG
Tag <strong> -
STYLE
Tag <style> -
SUB
Tag <sub> -
SUP
Tag <sup> -
TABLE
Tag <table> -
TD
Tag <td> -
TEXTAREA
Tag <textarea> -
TH
Tag <th> -
TITLE
Tag <title> -
TR
Tag <tr> -
TT
Tag <tt> -
U
Tag <u> -
UL
Tag <ul> -
VAR
Tag <var> -
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
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
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
-
Tag
public Tag()Constructs aTag
.- Since:
- 1.3
-
Tag
Creates a newTag
with the specifiedid
, and withcausesBreak
andisBlock
set tofalse
.- Parameters:
id
- the id of the new tag
-
Tag
Creates a newTag
with the specifiedid
;causesBreak
andisBlock
are defined by the user.- Parameters:
id
- the id of the new tagcausesBreak
-true
if this tag causes a break to the flow of dataisBlock
-true
if the tag is used to add structure to a document
-
-
Method Details
-
isBlock
public boolean isBlock()Returnstrue
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 returnsfalse
-
breaksFlow
public boolean breaksFlow()Returnstrue
if this tag causes a line break to the flow of data, otherwise returnsfalse
.- Returns:
true
if this tag causes a line break to the flow of data, otherwise returnsfalse
-
isPreformatted
public boolean isPreformatted()Returnstrue
if this tag is pre-formatted, which is true if the tag is eitherPRE
orTEXTAREA
.- Returns:
true
if this tag is pre-formatted, otherwise returnsfalse
-
toString
Returns the string representation of the tag.
-