APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.text.html

public Class HTML

extends Object
Class Inheritance
Imports
java.io.IOException, .ObjectInputStream, .Serial, .Serializable, java.util.Hashtable, .Map, javax.swing.text.AttributeSet, .StyleConstants, .StyleContext

Constants used in the HTMLDocument. These are basically tag and attribute definitions.
Authors
Timothy Prinzing, Sunita Mani

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
HTML.Attribute

Typesafe enumeration representing an HTML attribute.

public static class
HTML.Tag

Typesafe enumeration for an HTML tag.

public static class
HTML.UnknownTag

Class represents unknown HTML tag.

Field Summary

Modifier and TypeField and Description
private static final Hashtable<String, HTML.Attribute>
public static final String
NULL_ATTRIBUTE_VALUE

NULL_ATTRIBUTE_VALUE used in cases where the value for the attribute has not been specified.

private static final Map<Object, HTML.Tag>
scMapping

Maps from StyleConstant key to HTML.Tag.

private static final Hashtable<String, HTML.Tag>

Constructor Summary

AccessConstructor and Description
public
HTML()

Constructs a HTML.

Method Summary

Modifier and TypeMethod and Description
public static HTML.Attribute[]

Returns:

the set of HTML attributes recognized
getAllAttributeKeys
()

Returns the set of HTML attributes recognized.

public static HTML.Tag[]

Returns:

the set of actual HTML tags that are recognized by the default HTML reader
getAllTags
()

Returns the set of actual HTML tags that are recognized by the default HTML reader.

public static HTML.Attribute

Returns:

the Attribute corresponding to attName
getAttributeKey
(String
the String requested
attName
)

Fetches an attribute constant for a well-known attribute name (i.e. one of the attributes in the set {FACE, COMMENT, SIZE, COLOR, CLEAR, BACKGROUND, BGCOLOR, TEXT, LINK, VLINK, ALINK, WIDTH, HEIGHT, ALIGN, NAME, HREF, REL, REV, TITLE, TARGET, SHAPE, COORDS, ISMAP, NOHREF, ALT, ID, SRC, HSPACE, VSPACE, USEMAP, LOWSRC, CODEBASE, CODE, ARCHIVE, VALUE, VALUETYPE, TYPE, CLASS, STYLE, LANG, DIR, DECLARE, CLASSID, DATA, CODETYPE, STANDBY, BORDER, SHAPES, NOSHADE, COMPACT, START, ACTION, METHOD, ENCTYPE, CHECKED, MAXLENGTH, MULTIPLE, SELECTED, ROWS, COLS, DUMMY, CELLSPACING, CELLPADDING, VALIGN, HALIGN, NOWRAP, ROWSPAN, COLSPAN, PROMPT, HTTPEQUIV, CONTENT, LANGUAGE, VERSION, N, FRAMEBORDER, MARGINWIDTH, MARGINHEIGHT, SCROLLING, NORESIZE, MEDIA, ENDTAG}).

public static int

Returns:

an attribute value
getIntegerAttributeValue
(AttributeSet
the set of attributes to use to try to fetch a value
attr
,
HTML.Attribute
the key to use to fetch the value
key
,
int
the default value to use if the attribute isn't defined or there is an error converting to an integer
def
)

Fetches an integer attribute value.

public static HTML.Tag

Returns:

a tag constant corresponding to the tagName, or null if not found
getTag
(String
the String name requested
tagName
)

Fetches a tag constant for a well-known tag name (i.e. one of the tags in the set {A, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BIG, BLOCKQUOTE, BODY, BR, CAPTION, CENTER, CITE, CODE, DD, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I, IMG, INPUT, ISINDEX, KBD, LI, LINK, MAP, MENU, META, NOBR, NOFRAMES, OBJECT, OL, OPTION, P, PARAM, PRE, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, S, STRONG, STYLE, SUB, SUP, TABLE, TD, TEXTAREA, TH, TITLE, TR, TT, U, UL, VAR}.

pack-priv static HTML.Tag

Returns:

tag which corresponds to sc, or null if not found
getTagForStyleConstantsKey
(StyleConstants
the StyleConstants key
sc
)

Returns the HTML Tag associated with the StyleConstants key sc.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait