Class HTML.Tag
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final HTML.TagTag <a>static final HTML.TagTag <address>static final HTML.TagTag <applet>static final HTML.TagTag <area>static final HTML.TagTag <b>static final HTML.TagTag <base>static final HTML.TagTag <basefont>static final HTML.TagTag <big>static final HTML.TagTag <blockquote>static final HTML.TagTag <body>static final HTML.TagTag <br>static final HTML.TagTag <caption>static final HTML.TagTag <center>static final HTML.TagTag <cite>static final HTML.TagTag <code>static final HTML.TagAll comments are labeled with this tag.static final HTML.TagAll text content is labeled with this tag.static final HTML.TagTag <dd>static final HTML.TagTag <dfn>static final HTML.TagTag <dir>static final HTML.TagTag <div>static final HTML.TagTag <dl>static final HTML.TagTag <dt>static final HTML.TagTag <em>static final HTML.TagTag <font>static final HTML.TagTag <form>static final HTML.TagTag <frame>static final HTML.TagTag <frameset>static final HTML.TagTag <h1>static final HTML.TagTag <h2>static final HTML.TagTag <h3>static final HTML.TagTag <h4>static final HTML.TagTag <h5>static final HTML.TagTag <h6>static final HTML.TagTag <head>static final HTML.TagTag <hr>static final HTML.TagTag <html>static final HTML.TagTag <i>static final HTML.TagTag <img>static final HTML.TagAll text content must be in a paragraph element.static final HTML.TagTag <input>static final HTML.TagTag <isindex>static final HTML.TagTag <kbd>static final HTML.TagTag <li>static final HTML.TagTag <link>static final HTML.TagTag <map>static final HTML.TagTag <menu>static final HTML.TagTag <meta>static final HTML.TagTag <noframes>static final HTML.TagTag <object>static final HTML.TagTag <ol>static final HTML.TagTag <option>static final HTML.TagTag <p>static final HTML.TagTag <param>static final HTML.TagTag <pre>static final HTML.TagTag <s>static final HTML.TagTag <samp>static final HTML.TagTag <script>static final HTML.TagTag <select>static final HTML.TagTag <small>static final HTML.TagTag <span>static final HTML.TagTag <strike>static final HTML.TagTag <strong>static final HTML.TagTag <style>static final HTML.TagTag <sub>static final HTML.TagTag <sup>static final HTML.TagTag <table>static final HTML.TagTag <td>static final HTML.TagTag <textarea>static final HTML.TagTag <th>static final HTML.TagTag <title>static final HTML.TagTag <tr>static final HTML.TagTag <tt>static final HTML.TagTag <u>static final HTML.TagTag <ul>static final HTML.TagTag <var>
- 
Constructor SummaryConstructorsModifierConstructorDescriptionTag()Constructs aTag.protectedCreates a newTagwith the specifiedid, and withcausesBreakandisBlockset tofalse.protectedCreates a newTagwith the specifiedid;causesBreakandisBlockare defined by the user.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturnstrueif this tag causes a line break to the flow of data, otherwise returnsfalse.booleanisBlock()Returnstrueif this tag is a block tag, which is a tag used to add structure to a document.booleanReturnstrueif this tag is pre-formatted, which is true if the tag is eitherPREorTEXTAREA.toString()Returns the string representation of the tag.
- 
Field Details- 
ATag <a>
- 
ADDRESSTag <address>
- 
APPLETTag <applet>
- 
AREATag <area>
- 
BTag <b>
- 
BASETag <base>
- 
BASEFONTTag <basefont>
- 
BIGTag <big>
- 
BLOCKQUOTETag <blockquote>
- 
BODYTag <body>
- 
BRTag <br>
- 
CAPTIONTag <caption>
- 
CENTERTag <center>
- 
CITETag <cite>
- 
CODETag <code>
- 
DDTag <dd>
- 
DFNTag <dfn>
- 
DIRTag <dir>
- 
DIVTag <div>
- 
DLTag <dl>
- 
DTTag <dt>
- 
EMTag <em>
- 
FONTTag <font>
- 
FORMTag <form>
- 
FRAMETag <frame>
- 
FRAMESETTag <frameset>
- 
H1Tag <h1>
- 
H2Tag <h2>
- 
H3Tag <h3>
- 
H4Tag <h4>
- 
H5Tag <h5>
- 
H6Tag <h6>
- 
HEADTag <head>
- 
HRTag <hr>
- 
HTMLTag <html>
- 
ITag <i>
- 
IMGTag <img>
- 
INPUTTag <input>
- 
ISINDEXTag <isindex>
- 
KBDTag <kbd>
- 
LITag <li>
- 
LINKTag <link>
- 
MAPTag <map>
- 
MENUTag <menu>
- 
METATag <meta>
- 
NOFRAMESTag <noframes>
- 
OBJECTTag <object>
- 
OLTag <ol>
- 
OPTIONTag <option>
- 
PTag <p>
- 
PARAMTag <param>
- 
PRETag <pre>
- 
SAMPTag <samp>
- 
SCRIPTTag <script>
- 
SELECTTag <select>
- 
SMALLTag <small>
- 
SPANTag <span>
- 
STRIKETag <strike>
- 
STag <s>
- 
STRONGTag <strong>
- 
STYLETag <style>
- 
SUBTag <sub>
- 
SUPTag <sup>
- 
TABLETag <table>
- 
TDTag <td>
- 
TEXTAREATag <textarea>
- 
THTag <th>
- 
TITLETag <title>
- 
TRTag <tr>
- 
TTTag <tt>
- 
UTag <u>
- 
ULTag <ul>
- 
VARTag <var>
- 
IMPLIEDAll 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. 
- 
CONTENTAll 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. 
- 
COMMENTAll 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- 
Tagpublic Tag()Constructs aTag.- Since:
- 1.3
 
- 
TagCreates a newTagwith the specifiedid, and withcausesBreakandisBlockset tofalse.- Parameters:
- id- the id of the new tag
 
- 
TagCreates a newTagwith the specifiedid;causesBreakandisBlockare defined by the user.- Parameters:
- id- the id of the new tag
- causesBreak-- trueif this tag causes a break to the flow of data
- isBlock-- trueif the tag is used to add structure to a document
 
 
- 
- 
Method Details- 
isBlockpublic boolean isBlock()Returnstrueif this tag is a block tag, which is a tag used to add structure to a document.- Returns:
- trueif this tag is a block tag, otherwise returns- false
 
- 
breaksFlowpublic boolean breaksFlow()Returnstrueif this tag causes a line break to the flow of data, otherwise returnsfalse.- Returns:
- trueif this tag causes a line break to the flow of data, otherwise returns- false
 
- 
isPreformattedpublic boolean isPreformatted()Returnstrueif this tag is pre-formatted, which is true if the tag is eitherPREorTEXTAREA.- Returns:
- trueif this tag is pre-formatted, otherwise returns- false
 
- 
toString
 
-