javax.swing.text.html

Class HTML.Tag

Enclosing Class:
HTML
Known Direct Subclasses:
HTML.UnknownTag

public static class HTML.Tag
extends Object

Represents a HTML tag.

Field Summary

static HTML.Tag
A
The <a> tag
static HTML.Tag
ADDRESS
The <address> tag
static HTML.Tag
APPLET
The <applet> tag
static HTML.Tag
AREA
The <area> tag
static HTML.Tag
B
The <b> tag
static HTML.Tag
BASE
The <base> tag
static HTML.Tag
BASEFONT
The <basefont> tag
static HTML.Tag
BIG
The <big> tag
static HTML.Tag
BLOCKQUOTE
The <blockquote> tag , breaks flow, block tag.
static HTML.Tag
BODY
The <body> tag , breaks flow, block tag.
static HTML.Tag
BR
The <br> tag , breaks flow.
static HTML.Tag
CAPTION
The <caption> tag
static HTML.Tag
CENTER
The <center> tag , breaks flow.
static HTML.Tag
CITE
The <cite> tag
static HTML.Tag
CODE
The <code> tag
static HTML.Tag
COMMENT
All comments are labeled with this tag.
static HTML.Tag
CONTENT
All text content is labeled with this tag.
static HTML.Tag
DD
The <dd> tag , breaks flow, block tag.
static HTML.Tag
DFN
The <dfn> tag
static HTML.Tag
DIR
The <dir> tag , breaks flow, block tag.
static HTML.Tag
DIV
The <div> tag , breaks flow, block tag.
static HTML.Tag
DL
The <dl> tag , breaks flow, block tag.
static HTML.Tag
DT
The <dt> tag , breaks flow, block tag.
static HTML.Tag
EM
The <em> tag
static HTML.Tag
FONT
The <font> tag
static HTML.Tag
FORM
The <form> tag , breaks flow.
static HTML.Tag
FRAME
The <frame> tag
static HTML.Tag
FRAMESET
The <frameset> tag
static HTML.Tag
H1
The <h1> tag , breaks flow, block tag.
static HTML.Tag
H2
The <h2> tag , breaks flow, block tag.
static HTML.Tag
H3
The <h3> tag , breaks flow, block tag.
static HTML.Tag
H4
The <h4> tag , breaks flow, block tag.
static HTML.Tag
H5
The <h5> tag , breaks flow, block tag.
static HTML.Tag
H6
The <h6> tag , breaks flow, block tag.
static HTML.Tag
HEAD
The <head> tag , breaks flow, block tag.
static HTML.Tag
HR
The <hr> tag , breaks flow.
static HTML.Tag
HTML
The <html> tag , breaks flow.
static HTML.Tag
I
The <i> tag
static HTML.Tag
IMG
The <img> tag
static HTML.Tag
IMPLIED
All text content must be in a paragraph element.
static HTML.Tag
INPUT
The <input> tag
static HTML.Tag
ISINDEX
The <isindex> tag , breaks flow.
static HTML.Tag
KBD
The <kbd> tag
static HTML.Tag
LI
The <li> tag , breaks flow, block tag.
static HTML.Tag
LINK
The <link> tag
static HTML.Tag
MAP
The <map> tag
static HTML.Tag
MENU
The <menu> tag , breaks flow, block tag.
static HTML.Tag
META
The <meta> tag
static HTML.Tag
NOFRAMES
The <noframes> tag , breaks flow, block tag.
static HTML.Tag
OBJECT
The <object> tag
static HTML.Tag
OL
The <ol> tag , breaks flow, block tag.
static HTML.Tag
OPTION
The <option> tag
static HTML.Tag
P
The <p> tag , breaks flow, block tag.
static HTML.Tag
PARAM
The <param> tag
static HTML.Tag
PRE
The <pre> tag , breaks flow, block tag, preformatted.
static HTML.Tag
S
The <s> tag
static HTML.Tag
SAMP
The <samp> tag
static HTML.Tag
SCRIPT
The <script> tag
static HTML.Tag
SELECT
The <select> tag
static HTML.Tag
SMALL
The <small> tag
static HTML.Tag
SPAN
The <span> tag
static HTML.Tag
STRIKE
The <strike> tag
static HTML.Tag
STRONG
The <strong> tag
static HTML.Tag
STYLE
The <style> tag
static HTML.Tag
SUB
The <sub> tag
static HTML.Tag
SUP
The <sup> tag
static HTML.Tag
TABLE
The <table> tag , block tag.
static HTML.Tag
TD
The <td> tag , breaks flow, block tag.
static HTML.Tag
TEXTAREA
The <textarea> tag , preformatted.
static HTML.Tag
TH
The <th> tag , breaks flow, block tag.
static HTML.Tag
TITLE
The <title> tag , breaks flow, block tag.
static HTML.Tag
TR
The <tr> tag , block tag.
static HTML.Tag
TT
The <tt> tag
static HTML.Tag
U
The <u> tag
static HTML.Tag
UL
The <ul> tag , breaks flow, block tag.
static HTML.Tag
VAR
The <var> tag

Constructor Summary

Tag()
Create the unitialised instance of HTML.Tag.
Tag(String id)
Creates a new Tag with the specified id, and with causesBreak and isBlock set to false.
Tag(String id, boolean causesBreak, boolean isBlock)
Creates a new Tag with the specified tag name and causesBreak and isBlock properties.

Method Summary

boolean
breaksFlow()
Returns true if this tag causes a line break to the flow of text
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 tag name.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

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 Details

Tag

public Tag()
Create the unitialised instance of HTML.Tag. The breaksFlow(), isBlock() and isPreformatted() will always return false. The 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 Details

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.
Overrides:
toString in interface Object

HTML.java -- HTML document tag constants Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.