- 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 SummaryFields Modifier and Type Field Description static HTML.TagATag <a>static HTML.TagADDRESSTag <address>static HTML.TagAPPLETTag <applet>static HTML.TagAREATag <area>static HTML.TagBTag <b>static HTML.TagBASETag <base>static HTML.TagBASEFONTTag <basefont>static HTML.TagBIGTag <big>static HTML.TagBLOCKQUOTETag <blockquote>static HTML.TagBODYTag <body>static HTML.TagBRTag <br>static HTML.TagCAPTIONTag <caption>static HTML.TagCENTERTag <center>static HTML.TagCITETag <cite>static HTML.TagCODETag <code>static HTML.TagCOMMENTAll comments are labeled with this tag.static HTML.TagCONTENTAll text content is labeled with this tag.static HTML.TagDDTag <dd>static HTML.TagDFNTag <dfn>static HTML.TagDIRTag <dir>static HTML.TagDIVTag <div>static HTML.TagDLTag <dl>static HTML.TagDTTag <dt>static HTML.TagEMTag <em>static HTML.TagFONTTag <font>static HTML.TagFORMTag <form>static HTML.TagFRAMETag <frame>static HTML.TagFRAMESETTag <frameset>static HTML.TagH1Tag <h1>static HTML.TagH2Tag <h2>static HTML.TagH3Tag <h3>static HTML.TagH4Tag <h4>static HTML.TagH5Tag <h5>static HTML.TagH6Tag <h6>static HTML.TagHEADTag <head>static HTML.TagHRTag <hr>static HTML.TagHTMLTag <html>static HTML.TagITag <i>static HTML.TagIMGTag <img>static HTML.TagIMPLIEDAll text content must be in a paragraph element.static HTML.TagINPUTTag <input>static HTML.TagISINDEXTag <isindex>static HTML.TagKBDTag <kbd>static HTML.TagLITag <li>static HTML.TagLINKTag <link>static HTML.TagMAPTag <map>static HTML.TagMENUTag <menu>static HTML.TagMETATag <meta>static HTML.TagNOFRAMESTag <noframes>static HTML.TagOBJECTTag <object>static HTML.TagOLTag <ol>static HTML.TagOPTIONTag <option>static HTML.TagPTag <p>static HTML.TagPARAMTag <param>static HTML.TagPRETag <pre>static HTML.TagSTag <s>static HTML.TagSAMPTag <samp>static HTML.TagSCRIPTTag <script>static HTML.TagSELECTTag <select>static HTML.TagSMALLTag <small>static HTML.TagSPANTag <span>static HTML.TagSTRIKETag <strike>static HTML.TagSTRONGTag <strong>static HTML.TagSTYLETag <style>static HTML.TagSUBTag <sub>static HTML.TagSUPTag <sup>static HTML.TagTABLETag <table>static HTML.TagTDTag <td>static HTML.TagTEXTAREATag <textarea>static HTML.TagTHTag <th>static HTML.TagTITLETag <title>static HTML.TagTRTag <tr>static HTML.TagTTTag <tt>static HTML.TagUTag <u>static HTML.TagULTag <ul>static HTML.TagVARTag <var>
 - 
Constructor SummaryConstructors Modifier Constructor Description Tag()protectedTag(String id)Creates a newTagwith the specifiedid, and withcausesBreakandisBlockset tofalse.protectedTag(String id, boolean causesBreak, boolean isBlock)Creates a newTagwith the specifiedid;causesBreakandisBlockare defined by the user.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbreaksFlow()Returnstrueif 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.booleanisPreformatted()Returnstrueif this tag is pre-formatted, which is true if the tag is eitherPREorTEXTAREA.StringtoString()Returns the string representation of the tag.
 
- 
- 
- 
Field Detail- 
Apublic static final HTML.Tag A Tag <a>
 - 
ADDRESSpublic static final HTML.Tag ADDRESS Tag <address>
 - 
APPLETpublic static final HTML.Tag APPLET Tag <applet>
 - 
AREApublic static final HTML.Tag AREA Tag <area>
 - 
Bpublic static final HTML.Tag B Tag <b>
 - 
BASEpublic static final HTML.Tag BASE Tag <base>
 - 
BASEFONTpublic static final HTML.Tag BASEFONT Tag <basefont>
 - 
BIGpublic static final HTML.Tag BIG Tag <big>
 - 
BLOCKQUOTEpublic static final HTML.Tag BLOCKQUOTE Tag <blockquote>
 - 
BODYpublic static final HTML.Tag BODY Tag <body>
 - 
BRpublic static final HTML.Tag BR Tag <br>
 - 
CAPTIONpublic static final HTML.Tag CAPTION Tag <caption>
 - 
CENTERpublic static final HTML.Tag CENTER Tag <center>
 - 
CITEpublic static final HTML.Tag CITE Tag <cite>
 - 
CODEpublic static final HTML.Tag CODE Tag <code>
 - 
DDpublic static final HTML.Tag DD Tag <dd>
 - 
DFNpublic static final HTML.Tag DFN Tag <dfn>
 - 
DIRpublic static final HTML.Tag DIR Tag <dir>
 - 
DIVpublic static final HTML.Tag DIV Tag <div>
 - 
DLpublic static final HTML.Tag DL Tag <dl>
 - 
DTpublic static final HTML.Tag DT Tag <dt>
 - 
EMpublic static final HTML.Tag EM Tag <em>
 - 
FONTpublic static final HTML.Tag FONT Tag <font>
 - 
FORMpublic static final HTML.Tag FORM Tag <form>
 - 
FRAMEpublic static final HTML.Tag FRAME Tag <frame>
 - 
FRAMESETpublic static final HTML.Tag FRAMESET Tag <frameset>
 - 
H1public static final HTML.Tag H1 Tag <h1>
 - 
H2public static final HTML.Tag H2 Tag <h2>
 - 
H3public static final HTML.Tag H3 Tag <h3>
 - 
H4public static final HTML.Tag H4 Tag <h4>
 - 
H5public static final HTML.Tag H5 Tag <h5>
 - 
H6public static final HTML.Tag H6 Tag <h6>
 - 
HEADpublic static final HTML.Tag HEAD Tag <head>
 - 
HRpublic static final HTML.Tag HR Tag <hr>
 - 
HTMLpublic static final HTML.Tag HTML Tag <html>
 - 
Ipublic static final HTML.Tag I Tag <i>
 - 
IMGpublic static final HTML.Tag IMG Tag <img>
 - 
INPUTpublic static final HTML.Tag INPUT Tag <input>
 - 
ISINDEXpublic static final HTML.Tag ISINDEX Tag <isindex>
 - 
KBDpublic static final HTML.Tag KBD Tag <kbd>
 - 
LIpublic static final HTML.Tag LI Tag <li>
 - 
LINKpublic static final HTML.Tag LINK Tag <link>
 - 
MAPpublic static final HTML.Tag MAP Tag <map>
 - 
MENUpublic static final HTML.Tag MENU Tag <menu>
 - 
METApublic static final HTML.Tag META Tag <meta>
 - 
NOFRAMESpublic static final HTML.Tag NOFRAMES Tag <noframes>
 - 
OBJECTpublic static final HTML.Tag OBJECT Tag <object>
 - 
OLpublic static final HTML.Tag OL Tag <ol>
 - 
OPTIONpublic static final HTML.Tag OPTION Tag <option>
 - 
Ppublic static final HTML.Tag P Tag <p>
 - 
PARAMpublic static final HTML.Tag PARAM Tag <param>
 - 
PREpublic static final HTML.Tag PRE Tag <pre>
 - 
SAMPpublic static final HTML.Tag SAMP Tag <samp>
 - 
SCRIPTpublic static final HTML.Tag SCRIPT Tag <script>
 - 
SELECTpublic static final HTML.Tag SELECT Tag <select>
 - 
SMALLpublic static final HTML.Tag SMALL Tag <small>
 - 
SPANpublic static final HTML.Tag SPAN Tag <span>
 - 
STRIKEpublic static final HTML.Tag STRIKE Tag <strike>
 - 
Spublic static final HTML.Tag S Tag <s>
 - 
STRONGpublic static final HTML.Tag STRONG Tag <strong>
 - 
STYLEpublic static final HTML.Tag STYLE Tag <style>
 - 
SUBpublic static final HTML.Tag SUB Tag <sub>
 - 
SUPpublic static final HTML.Tag SUP Tag <sup>
 - 
TABLEpublic static final HTML.Tag TABLE Tag <table>
 - 
TDpublic static final HTML.Tag TD Tag <td>
 - 
TEXTAREApublic static final HTML.Tag TEXTAREA Tag <textarea>
 - 
THpublic static final HTML.Tag TH Tag <th>
 - 
TITLEpublic static final HTML.Tag TITLE Tag <title>
 - 
TRpublic static final HTML.Tag TR Tag <tr>
 - 
TTpublic static final HTML.Tag TT Tag <tt>
 - 
Upublic static final HTML.Tag U Tag <u>
 - 
ULpublic static final HTML.Tag UL Tag <ul>
 - 
VARpublic static final HTML.Tag VAR Tag <var>
 - 
IMPLIEDpublic 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. 
 - 
CONTENTpublic 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. 
 - 
COMMENTpublic 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 Detail- 
Tagpublic Tag() - Since:
- 1.3
 
 - 
Tagprotected Tag(String id) Creates a newTagwith the specifiedid, and withcausesBreakandisBlockset tofalse.- Parameters:
- id- the id of the new tag
 
 - 
Tagprotected Tag(String id, boolean causesBreak, boolean isBlock) Creates 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 Detail- 
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
 
 
- 
 
-