public static class

HTML.Tag

extends Object
java.lang.Object
   ↳ javax.swing.text.html.HTML.Tag
Known Direct Subclasses

Class Overview

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.

Summary

Fields
public static final HTML.Tag A
public static final HTML.Tag ADDRESS
public static final HTML.Tag APPLET
public static final HTML.Tag AREA
public static final HTML.Tag B
public static final HTML.Tag BASE
public static final HTML.Tag BASEFONT
public static final HTML.Tag BIG
public static final HTML.Tag BLOCKQUOTE
public static final HTML.Tag BODY
public static final HTML.Tag BR
public static final HTML.Tag CAPTION
public static final HTML.Tag CENTER
public static final HTML.Tag CITE
public static final HTML.Tag CODE
public static final HTML.Tag COMMENT All comments are labeled with this tag.
public static final HTML.Tag CONTENT All text content is labeled with this tag.
public static final HTML.Tag DD
public static final HTML.Tag DFN
public static final HTML.Tag DIR
public static final HTML.Tag DIV
public static final HTML.Tag DL
public static final HTML.Tag DT
public static final HTML.Tag EM
public static final HTML.Tag FONT
public static final HTML.Tag FORM
public static final HTML.Tag FRAME
public static final HTML.Tag FRAMESET
public static final HTML.Tag H1
public static final HTML.Tag H2
public static final HTML.Tag H3
public static final HTML.Tag H4
public static final HTML.Tag H5
public static final HTML.Tag H6
public static final HTML.Tag HEAD
public static final HTML.Tag HR
public static final HTML.Tag HTML
public static final HTML.Tag I
public static final HTML.Tag IMG
public static final HTML.Tag IMPLIED All text content must be in a paragraph element.
public static final HTML.Tag INPUT
public static final HTML.Tag ISINDEX
public static final HTML.Tag KBD
public static final HTML.Tag LI
public static final HTML.Tag LINK
public static final HTML.Tag MAP
public static final HTML.Tag MENU
public static final HTML.Tag META
public static final HTML.Tag NOFRAMES
public static final HTML.Tag OBJECT
public static final HTML.Tag OL
public static final HTML.Tag OPTION
public static final HTML.Tag P
public static final HTML.Tag PARAM
public static final HTML.Tag PRE
public static final HTML.Tag S
public static final HTML.Tag SAMP
public static final HTML.Tag SCRIPT
public static final HTML.Tag SELECT
public static final HTML.Tag SMALL
public static final HTML.Tag SPAN
public static final HTML.Tag STRIKE
public static final HTML.Tag STRONG
public static final HTML.Tag STYLE
public static final HTML.Tag SUB
public static final HTML.Tag SUP
public static final HTML.Tag TABLE
public static final HTML.Tag TD
public static final HTML.Tag TEXTAREA
public static final HTML.Tag TH
public static final HTML.Tag TITLE
public static final HTML.Tag TR
public static final HTML.Tag TT
public static final HTML.Tag U
public static final HTML.Tag UL
public static final HTML.Tag VAR
Public Constructors
HTML.Tag()
Protected Constructors
HTML.Tag(String id)
Creates a new Tag with the specified id, and with causesBreak and isBlock set to false.
HTML.Tag(String id, boolean causesBreak, boolean isBlock)
Creates a new Tag with the specified id; causesBreak and isBlock are defined by the user.
Public Methods
boolean breaksFlow()
Returns true if this tag causes a line break to the flow of data, otherwise returns false.
boolean isBlock()
Returns true if this tag is a block tag, which is a tag used to add structure to a document.
boolean isPreformatted()
Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA.
String toString()
Returns the string representation of the tag.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final HTML.Tag A

public static final HTML.Tag ADDRESS

public static final HTML.Tag APPLET

public static final HTML.Tag AREA

public static final HTML.Tag B

public static final HTML.Tag BASE

public static final HTML.Tag BASEFONT

public static final HTML.Tag BIG

public static final HTML.Tag BLOCKQUOTE

public static final HTML.Tag BODY

public static final HTML.Tag BR

public static final HTML.Tag CAPTION

public static final HTML.Tag CENTER

public static final HTML.Tag CITE

public static final HTML.Tag CODE

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.

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.

public static final HTML.Tag DD

public static final HTML.Tag DFN

public static final HTML.Tag DIR

public static final HTML.Tag DIV

public static final HTML.Tag DL

public static final HTML.Tag DT

public static final HTML.Tag EM

public static final HTML.Tag FONT

public static final HTML.Tag FORM

public static final HTML.Tag FRAME

public static final HTML.Tag FRAMESET

public static final HTML.Tag H1

public static final HTML.Tag H2

public static final HTML.Tag H3

public static final HTML.Tag H4

public static final HTML.Tag H5

public static final HTML.Tag H6

public static final HTML.Tag HEAD

public static final HTML.Tag HR

public static final HTML.Tag HTML

public static final HTML.Tag I

public static final HTML.Tag IMG

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.

public static final HTML.Tag INPUT

public static final HTML.Tag ISINDEX

public static final HTML.Tag KBD

public static final HTML.Tag LI

public static final HTML.Tag LINK

public static final HTML.Tag MAP

public static final HTML.Tag MENU

public static final HTML.Tag META

public static final HTML.Tag NOFRAMES

public static final HTML.Tag OBJECT

public static final HTML.Tag OL

public static final HTML.Tag OPTION

public static final HTML.Tag P

public static final HTML.Tag PARAM

public static final HTML.Tag PRE

public static final HTML.Tag S

public static final HTML.Tag SAMP

public static final HTML.Tag SCRIPT

public static final HTML.Tag SELECT

public static final HTML.Tag SMALL

public static final HTML.Tag SPAN

public static final HTML.Tag STRIKE

public static final HTML.Tag STRONG

public static final HTML.Tag STYLE

public static final HTML.Tag SUB

public static final HTML.Tag SUP

public static final HTML.Tag TABLE

public static final HTML.Tag TD

public static final HTML.Tag TEXTAREA

public static final HTML.Tag TH

public static final HTML.Tag TITLE

public static final HTML.Tag TR

public static final HTML.Tag TT

public static final HTML.Tag U

public static final HTML.Tag UL

public static final HTML.Tag VAR

Public Constructors

public HTML.Tag ()

Protected Constructors

protected HTML.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

protected HTML.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

Public Methods

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

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

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

public String toString ()

Returns the string representation of the tag.

Returns
  • the String representation of the tag