javax.swing.text.html

异常
java.lang.Object
  继承者 javax.swing.text.html.HTML.Tag
直接已知子类:
HTML.UnknownTag
正在封闭类:
HTML

public static class HTML.Tag
     
extends Object

HTML 标记的类型安全的枚举。虽然 HTML 标记集合是一个封闭集合,但我们将此集合置于开放状态,以便用户可将自己的标记类型添加到其自定义解析器中,并且仍保持与 reader 的通信。


字段摘要
static HTML.Tag A
           
static HTML.Tag ADDRESS
           
static HTML.Tag APPLET
           
static HTML.Tag AREA
           
static HTML.Tag B
           
static HTML.Tag BASE
           
static HTML.Tag BASEFONT
           
static HTML.Tag BIG
           
static HTML.Tag BLOCKQUOTE
           
static HTML.Tag BODY
           
static HTML.Tag BR
           
static HTML.Tag CAPTION
           
static HTML.Tag CENTER
           
static HTML.Tag CITE
           
static HTML.Tag CODE
           
static HTML.Tag COMMENT
          所有注释以此标记作为标签。
static HTML.Tag CONTENT
          所有文本内容以此标记作为标签。
static HTML.Tag DD
           
static HTML.Tag DFN
           
static HTML.Tag DIR
           
static HTML.Tag DIV
           
static HTML.Tag DL
           
static HTML.Tag DT
           
static HTML.Tag EM
           
static HTML.Tag FONT
           
static HTML.Tag FORM
           
static HTML.Tag FRAME
           
static HTML.Tag FRAMESET
           
static HTML.Tag H1
           
static HTML.Tag H2
           
static HTML.Tag H3
           
static HTML.Tag H4
           
static HTML.Tag H5
           
static HTML.Tag H6
           
static HTML.Tag HEAD
           
static HTML.Tag HR
           
static HTML.Tag HTML
           
static HTML.Tag I
           
static HTML.Tag IMG
           
static HTML.Tag IMPLIED
          所有文本内容必须包含在段落元素中。
static HTML.Tag INPUT
           
static HTML.Tag ISINDEX
           
static HTML.Tag KBD
           
static HTML.Tag LI
           
static HTML.Tag LINK
           
static HTML.Tag MAP
           
static HTML.Tag MENU
           
static HTML.Tag META
           
static HTML.Tag NOFRAMES
           
static HTML.Tag OBJECT
           
static HTML.Tag OL
           
static HTML.Tag OPTION
           
static HTML.Tag P
           
static HTML.Tag PARAM
           
static HTML.Tag PRE
           
static HTML.Tag S
           
static HTML.Tag SAMP
           
static HTML.Tag SCRIPT
           
static HTML.Tag SELECT
           
static HTML.Tag SMALL
           
static HTML.Tag SPAN
           
static HTML.Tag STRIKE
           
static HTML.Tag STRONG
           
static HTML.Tag STYLE
           
static HTML.Tag SUB
           
static HTML.Tag SUP
           
static HTML.Tag TABLE
           
static HTML.Tag TD
           
static HTML.Tag TEXTAREA
           
static HTML.Tag TH
           
static HTML.Tag TITLE
           
static HTML.Tag TR
           
static HTML.Tag TT
           
static HTML.Tag U
           
static HTML.Tag UL
           
static HTML.Tag VAR
           
 
构造方法摘要
  HTML.Tag()
           
protected HTML.Tag(String id)
          创建具有指定 id 的新 Tag,且 causesBreakisBlock 设置为 false
protected HTML.Tag(String id, boolean causesBreak, boolean isBlock)
          创建具有指定 id 的新 TagcausesBreakisBlock 由用户定义。
 
方法摘要
 boolean breaksFlow()
          如果此标记导致数据流换行,则返回 true;否则返回 false
 boolean isBlock()
          如果此标记是块标记(块标记是用于向文档添加结构的标记),则返回 true
 boolean isPreformatted()
          如果此标记是预格式化的,则返回 true,即如果此标记是 PRETEXTAREA,则为 true。
 String toString()
          返回该标记的字符串表示形式。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

A

public static final HTML.Tag A

ADDRESS

public static final HTML.Tag ADDRESS

APPLET

public static final HTML.Tag APPLET

AREA

public static final HTML.Tag AREA

B

public static final HTML.Tag B

BASE

public static final HTML.Tag BASE

BASEFONT

public static final HTML.Tag BASEFONT

BIG

public static final HTML.Tag BIG

BLOCKQUOTE

public static final HTML.Tag BLOCKQUOTE

BODY

public static final HTML.Tag BODY

BR

public static final HTML.Tag BR

CAPTION

public static final HTML.Tag CAPTION

CENTER

public static final HTML.Tag CENTER

CITE

public static final HTML.Tag CITE

CODE

public static final HTML.Tag CODE

DD

public static final HTML.Tag DD

DFN

public static final HTML.Tag DFN

DIR

public static final HTML.Tag DIR

DIV

public static final HTML.Tag DIV

DL

public static final HTML.Tag DL

DT

public static final HTML.Tag DT

EM

public static final HTML.Tag EM

FONT

public static final HTML.Tag FONT

FORM

public static final HTML.Tag FORM

FRAME

public static final HTML.Tag FRAME

FRAMESET

public static final HTML.Tag FRAMESET

H1

public static final HTML.Tag H1

H2

public static final HTML.Tag H2

H3

public static final HTML.Tag H3

H4

public static final HTML.Tag H4

H5

public static final HTML.Tag H5

H6

public static final HTML.Tag H6

HEAD

public static final HTML.Tag HEAD

HR

public static final HTML.Tag HR

HTML

public static final HTML.Tag HTML

I

public static final HTML.Tag I

IMG

public static final HTML.Tag IMG

INPUT

public static final HTML.Tag INPUT

ISINDEX

public static final HTML.Tag ISINDEX

KBD

public static final HTML.Tag KBD

LI

public static final HTML.Tag LI

LINK

public static final HTML.Tag LINK

MAP

public static final HTML.Tag MAP

MENU

public static final HTML.Tag MENU

META

public static final HTML.Tag META

NOFRAMES

public static final HTML.Tag NOFRAMES

OBJECT

public static final HTML.Tag OBJECT

OL

public static final HTML.Tag OL

OPTION

public static final HTML.Tag OPTION

P

public static final HTML.Tag P

PARAM

public static final HTML.Tag PARAM

PRE

public static final HTML.Tag PRE

SAMP

public static final HTML.Tag SAMP

SCRIPT

public static final HTML.Tag SCRIPT

SELECT

public static final HTML.Tag SELECT

SMALL

public static final HTML.Tag SMALL

SPAN

public static final HTML.Tag SPAN

STRIKE

public static final HTML.Tag STRIKE

S

public static final HTML.Tag S

STRONG

public static final HTML.Tag STRONG

STYLE

public static final HTML.Tag STYLE

SUB

public static final HTML.Tag SUB

SUP

public static final HTML.Tag SUP

TABLE

public static final HTML.Tag TABLE

TD

public static final HTML.Tag TD

TEXTAREA

public static final HTML.Tag TEXTAREA

TH

public static final HTML.Tag TH

TITLE

public static final HTML.Tag TITLE

TR

public static final HTML.Tag TR

TT

public static final HTML.Tag TT

U

public static final HTML.Tag U

UL

public static final HTML.Tag UL

VAR

public static final HTML.Tag VAR

IMPLIED

public static final HTML.Tag IMPLIED
所有文本内容必须包含在段落元素中。如果遇到内容时段落不存在,则构造一个段落。

这是由 HTML reader 合成的标记。由于通过元素的标记类型来标识各个元素,所以我们创建某个伪标记类型来标记所构造的元素。


CONTENT

public static final HTML.Tag CONTENT
所有文本内容以此标记作为标签。

这是由 HTML reader 合成的标记。由于通过元素的标记类型来标识各个元素,所以我们创建某个伪标记类型来标记所构造的元素。


COMMENT

public static final HTML.Tag COMMENT
所有注释以此标记作为标签。

这是由 HTML reader 合成的标记。由于通过元素的标记类型来标识各个元素,所以我们创建某个伪标记类型来标记所构造的元素。

构造方法详细信息

HTML.Tag

public HTML.Tag()
从以下版本开始:
1.3

HTML.Tag

protected HTML.Tag(String id)
创建具有指定 id 的新 Tag,且 causesBreakisBlock 设置为 false

参数:
id - 新标记的 id

HTML.Tag

protected HTML.Tag(String id,
                   boolean causesBreak,
                   boolean isBlock)
创建具有指定 id 的新 TagcausesBreakisBlock 由用户定义。

参数:
id - 新标记的 id
causesBreak - 如果此标记导致数据流拆分,则为 true
isBlock - 如果标记用于向文档添加结构,则为 true
方法详细信息

isBlock

public boolean isBlock()
如果此标记是块标记(块标记是用于向文档添加结构的标记),则返回 true

返回:
如果此标记是块标记,则返回 true;否则返回 false

breaksFlow

public boolean breaksFlow()
如果此标记导致数据流换行,则返回 true;否则返回 false

返回:
如果此标记导致数据流换行,则返回 true<