|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.html.HTML
public class HTML
HTML attribute and tag definitions.
| Nested Class Summary | |
|---|---|
static class |
HTML.Attribute
Represents a HTML attribute. |
static class |
HTML.Tag
Represents a HTML tag. |
static class |
HTML.UnknownTag
Represents an unknown HTML tag. |
| Field Summary | |
|---|---|
static String |
NULL_ATTRIBUTE_VALUE
This value is returned for attributes without value that have no default value defined in the DTD. |
| Constructor Summary | |
|---|---|
HTML()
The public constructor (does nothing). |
|
| Method Summary | |
|---|---|
static HTML.Attribute[] |
getAllAttributeKeys()
Returns the set of the recognized HTML attributes. |
static HTML.Tag[] |
getAllTags()
Returns the set of actual HTML tags that are recognized by the default HTML reader. |
static HTML.Attribute |
getAttributeKey(String attName)
Returns an htl attribute constant for the given attribute name. |
static int |
getIntegerAttributeValue(AttributeSet set,
HTML.Attribute attribute,
int defaultValue)
Searches the value of given attribute in the provided set. |
static HTML.Tag |
getTag(String tagName)
Returns a HTML tag constant for the given HTML attribute name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NULL_ATTRIBUTE_VALUE
| Constructor Detail |
|---|
public HTML()
| Method Detail |
|---|
public static HTML.Attribute[] getAllAttributeKeys()
public static HTML.Tag[] getAllTags()
public static HTML.Attribute getAttributeKey(String attName)
attName - the attribute name, case insensitive
public static int getIntegerAttributeValue(AttributeSet set,
HTML.Attribute attribute,
int defaultValue)
SimpleAttributeSet ase = new SimpleAttributeSet();
ase.addAttribute(HTML.getAttributeKey("size"),"222");
System.out.println(
HTML.getIntegerAttributeValue
(ase, HTML.getAttributeKey("size"), 333)); // prints "222"
System.out.println(
HTML.getIntegerAttributeValue
(ase, HTML.getAttributeKey("width"), 333)); // prints "333".
set - The attribute set to search in. If the set contains the
given attribute, it must by a type of String.attribute - The html attribute to search indefaultValue - The value that is returned if the attribute is not
found in the given set or if the NumberFormatException was thrown
during the parsing.public static HTML.Tag getTag(String tagName)
tagName - the tag name, case insensitive
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||