javax.swing.text.html

Class HTML.Tag

public static class HTML.Tag extends Object

Represents a HTML tag.
Field Summary
static HTML.TagA
The <a> tag
static HTML.TagADDRESS
The <address> tag
static HTML.TagAPPLET
The <applet> tag
static HTML.TagAREA
The <area> tag
static HTML.TagB
The <b> tag
static HTML.TagBASE
The <base> tag
static HTML.TagBASEFONT
The <basefont> tag
static HTML.TagBIG
The <big> tag
static HTML.TagBLOCKQUOTE
The <blockquote> tag , breaks flow, block tag.
static HTML.TagBODY
The <body> tag , breaks flow, block tag.
static HTML.TagBR
The <br> tag , breaks flow.
static HTML.TagCAPTION
The <caption> tag
static HTML.TagCENTER
The <center> tag , breaks flow.
static HTML.TagCITE
The <cite> tag
static HTML.TagCODE
The <code> tag
static HTML.TagCOMMENT
All comments are labeled with this tag.
static HTML.TagCONTENT
All text content is labeled with this tag.
static HTML.TagDD
The <dd> tag , breaks flow, block tag.
static HTML.TagDFN
The <dfn> tag
static HTML.TagDIR
The <dir> tag , breaks flow, block tag.
static HTML.TagDIV
The <div> tag , breaks flow, block tag.
static HTML.TagDL
The <dl> tag , breaks flow, block tag.
static HTML.TagDT
The <dt> tag , breaks flow, block tag.
static HTML.TagEM
The <em> tag
static HTML.TagFONT
The <font> tag
static HTML.TagFORM
The <form> tag , breaks flow.
static HTML.TagFRAME
The <frame> tag
static HTML.TagFRAMESET
The <frameset> tag
static HTML.TagH1
The <h1> tag , breaks flow, block tag.
static HTML.TagH2
The <h2> tag , breaks flow, block tag.
static HTML.TagH3
The <h3> tag , breaks flow, block tag.
static HTML.TagH4
The <h4> tag , breaks flow, block tag.
static HTML.TagH5
The <h5> tag , breaks flow, block tag.
static HTML.TagH6
The <h6> tag , breaks flow, block tag.
static HTML.TagHEAD
The <head> tag , breaks flow, block tag.
static HTML.TagHR
The <hr> tag , breaks flow.
static HTML.TagHTML
The <html> tag , breaks flow.
static HTML.TagI
The <i> tag
static HTML.TagIMG
The <img> tag
static HTML.TagIMPLIED
All text content must be in a paragraph element.
static HTML.TagINPUT
The <input> tag
static HTML.TagISINDEX
The <isindex> tag , breaks flow.
static HTML.TagKBD
The <kbd> tag
static HTML.TagLI
The <li> tag , breaks flow, block tag.
static HTML.TagLINK
The <link> tag
static HTML.TagMAP
The <map> tag
static HTML.TagMENU
The <menu> tag , breaks flow, block tag.
static HTML.TagMETA
The <meta> tag
static HTML.TagNOFRAMES
The <noframes> tag , breaks flow, block tag.
static HTML.TagOBJECT
The <object> tag
static HTML.TagOL
The <ol> tag , breaks flow, block tag.
static HTML.TagOPTION
The <option> tag
static HTML.TagP
The <p> tag , breaks flow, block tag.
static HTML.TagPARAM
The <param> tag
static HTML.TagPRE
The <pre> tag , breaks flow, block tag, preformatted.
static HTML.TagS
The <s> tag
static HTML.TagSAMP
The <samp> tag
static HTML.TagSCRIPT
The <script> tag
static HTML.TagSELECT
The <select> tag
static HTML.TagSMALL
The <small> tag
static HTML.TagSPAN
The <span> tag
static HTML.TagSTRIKE
The <strike> tag
static HTML.TagSTRONG
The <strong> tag
static HTML.TagSTYLE
The <style> tag
static HTML.TagSUB
The <sub> tag
static HTML.TagSUP
The <sup> tag
static HTML.TagTABLE
The <table> tag , block tag.
static HTML.TagTD
The <td> tag , breaks flow, block tag.
static HTML.TagTEXTAREA
The <textarea> tag , preformatted.
static HTML.TagTH
The <th> tag , breaks flow, block tag.
static HTML.TagTITLE
The <title> tag , breaks flow, block tag.
static HTML.TagTR
The <tr> tag , block tag.
static HTML.TagTT
The <tt> tag
static HTML.TagU
The <u> tag
static HTML.TagUL
The <ul> tag , breaks flow, block tag.
static HTML.TagVAR
The <var> tag
Constructor Summary
Tag()
Create the unitialised instance of HTML.Tag.
protected Tag(String id)
Creates a new Tag with the specified id, and with causesBreak and isBlock set to false.
protected Tag(String id, boolean causesBreak, boolean isBlock)
Creates a new Tag with the specified tag name and causesBreak and isBlock properties.
Method Summary
booleanbreaksFlow()
Returns true if this tag causes a line break to the flow of text
booleanisBlock()
Returns true if this tag is a block tag, which is a tag used to add structure to a document.
booleanisPreformatted()
Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA
StringtoString()
Returns the tag name.

Field Detail

A

public static final HTML.Tag A
The <a> tag

ADDRESS

public static final HTML.Tag ADDRESS
The <address> tag

APPLET

public static final HTML.Tag APPLET
The <applet> tag

AREA

public static final HTML.Tag AREA
The <area> tag

B

public static final HTML.Tag B
The <b> tag

BASE

public static final HTML.Tag BASE
The <base> tag

BASEFONT

public static final HTML.Tag BASEFONT
The <basefont> tag

BIG

public static final HTML.Tag BIG
The <big> tag

BLOCKQUOTE

public static final HTML.Tag BLOCKQUOTE
The <blockquote> tag , breaks flow, block tag.

BODY

public static final HTML.Tag BODY
The <body> tag , breaks flow, block tag.

BR

public static final HTML.Tag BR
The <br> tag , breaks flow.

CAPTION

public static final HTML.Tag CAPTION
The <caption> tag

CENTER

public static final HTML.Tag CENTER
The <center> tag , breaks flow.

CITE

public static final HTML.Tag CITE
The <cite> tag

CODE

public static final HTML.Tag CODE
The <code> tag

COMMENT

public static final HTML.Tag COMMENT
All comments are labeled with this tag. This tag is not included into the array, returned by getAllTags(). toString() returns 'comment'. HTML reader synthesizes this tag.

CONTENT

public static final HTML.Tag CONTENT
All text content is labeled with this tag. This tag is not included into the array, returned by getAllTags(). toString() returns 'content'. HTML reader synthesizes this tag.

DD

public static final HTML.Tag DD
The <dd> tag , breaks flow, block tag.

DFN

public static final HTML.Tag DFN
The <dfn> tag

DIR

public static final HTML.Tag DIR
The <dir> tag , breaks flow, block tag.

DIV

public static final HTML.Tag DIV
The <div> tag , breaks flow, block tag.

DL

public static final HTML.Tag DL
The <dl> tag , breaks flow, block tag.

DT

public static final HTML.Tag DT
The <dt> tag , breaks flow, block tag.

EM

public static final HTML.Tag EM
The <em> tag

FONT

public static final HTML.Tag FONT
The <font> tag

FORM

public static final HTML.Tag FORM
The <form> tag , breaks flow.

FRAME

public static final HTML.Tag FRAME
The <frame> tag

FRAMESET

public static final HTML.Tag FRAMESET
The <frameset> tag

H1

public static final HTML.Tag H1
The <h1> tag , breaks flow, block tag.

H2

public static final HTML.Tag H2
The <h2> tag , breaks flow, block tag.

H3

public static final HTML.Tag H3
The <h3> tag , breaks flow, block tag.

H4

public static final HTML.Tag H4
The <h4> tag , breaks flow, block tag.

H5

public static final HTML.Tag H5
The <h5> tag , breaks flow, block tag.

H6

public static final HTML.Tag H6
The <h6> tag , breaks flow, block tag.

HEAD

public static final HTML.Tag HEAD
The <head> tag , breaks flow, block tag.

HR

public static final HTML.Tag HR
The <hr> tag , breaks flow.

HTML

public static final HTML.Tag HTML
The <html> tag , breaks flow.

I

public static final HTML.Tag I
The <i> tag

IMG

public static final HTML.Tag IMG
The <img> tag

IMPLIED

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. toString() returns 'p-implied'. HTML reader synthesizes this tag.

INPUT

public static final HTML.Tag INPUT
The <input> tag

ISINDEX

public static final HTML.Tag ISINDEX
The <isindex> tag , breaks flow.

KBD

public static final HTML.Tag KBD
The <kbd> tag

LI

public static final HTML.Tag LI
The <li> tag , breaks flow, block tag.

LINK

public static final HTML.Tag LINK
The <link> tag

MAP

public static final HTML.Tag MAP
The <map> tag

MENU

public static final HTML.Tag MENU
The <menu> tag , breaks flow, block tag.

META

public static final HTML.Tag META
The <meta> tag

NOFRAMES

public static final HTML.Tag NOFRAMES
The <noframes> tag , breaks flow, block tag.

OBJECT

public static final HTML.Tag OBJECT
The <object> tag

OL

public static final HTML.Tag OL
The <ol> tag , breaks flow, block tag.

OPTION

public static final HTML.Tag OPTION
The <option> tag

P

public static final HTML.Tag P
The <p> tag , breaks flow, block tag.

PARAM

public static final HTML.Tag PARAM
The <param> tag

PRE

public static final HTML.Tag PRE
The <pre> tag , breaks flow, block tag, preformatted.

S

public static final HTML.Tag S
The <s> tag

SAMP

public static final HTML.Tag SAMP
The <samp> tag

SCRIPT

public static final HTML.Tag SCRIPT
The <script> tag

SELECT

public static final HTML.Tag SELECT
The <select> tag

SMALL

public static final HTML.Tag SMALL
The <small> tag

SPAN

public static final HTML.Tag SPAN
The <span> tag

STRIKE

public static final HTML.Tag STRIKE
The <strike> tag

STRONG

public static final HTML.Tag STRONG
The <strong> tag

STYLE

public static final HTML.Tag STYLE
The <style> tag

SUB

public static final HTML.Tag SUB
The <sub> tag

SUP

public static final HTML.Tag SUP
The <sup> tag

TABLE

public static final HTML.Tag TABLE
The <table> tag , block tag.

TD

public static final HTML.Tag TD
The <td> tag , breaks flow, block tag.

TEXTAREA

public static final HTML.Tag TEXTAREA
The <textarea> tag , preformatted.

TH

public static final HTML.Tag TH
The <th> tag , breaks flow, block tag.

TITLE

public static final HTML.Tag TITLE
The <title> tag , breaks flow, block tag.

TR

public static final HTML.Tag TR
The <tr> tag , block tag.

TT

public static final HTML.Tag TT
The <tt> tag

U

public static final HTML.Tag U
The <u> tag

UL

public static final HTML.Tag UL
The <ul> tag , breaks flow, block tag.

VAR

public static final HTML.Tag VAR
The <var> tag

Constructor Detail

Tag

public Tag()
Create the unitialised instance of HTML.Tag. The {@link #breaksFlow()}, {@link #isBlock()} and {@link #isPreformatted()} will always return false. The {@link #toString()} will return null.

Since: 1.3

Tag

protected Tag(String id)
Creates a new Tag with the specified id, and with causesBreak and isBlock set to false.

Tag

protected Tag(String id, boolean causesBreak, boolean isBlock)
Creates a new Tag with the specified tag name and causesBreak and isBlock properties.

Method Detail

breaksFlow

public boolean breaksFlow()
Returns true if this tag causes a line break to the flow of text

isBlock

public boolean isBlock()
Returns true if this tag is a block tag, which is a tag used to add structure to a document.

isPreformatted

public boolean isPreformatted()
Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA

toString

public String toString()
Returns the tag name. The names of the built-in tags are always returned in lowercase.