JavaTM 2 Platform
Std. Ed. v1.3.1

javax.swing.text.html
Class HTML

java.lang.Object
  |
  +--javax.swing.text.html.HTML

public class HTML
extends Object

Constants used in the HTMLDocument. These are basically tag and attribute definitions.


Inner Class Summary
static class HTML.Attribute
          Typesafe enumeration representing an html attribute.
static class HTML.Tag
          Typesafe enumeration for an html tag.
static class HTML.UnknownTag
           
 
Field Summary
static String NULL_ATTRIBUTE_VALUE
           
 
Constructor Summary
HTML()
           
 
Method Summary
static HTML.Attribute[] getAllAttributeKeys()
          This is the set of html attributes recognized.
static HTML.Tag[] getAllTags()
          This is the set of actual html tags that are known about the the default html reader.
static HTML.Attribute getAttributeKey(String attName)
          Fetch an attribute constant for a well-known attribute name (i.e.
static int getIntegerAttributeValue(AttributeSet attr, HTML.Attribute key, int def)
          Fetch an integer attribute value.
static HTML.Tag getTag(String tagName)
          Fetch a tag constant for a well-known tag name (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_ATTRIBUTE_VALUE

public static final String NULL_ATTRIBUTE_VALUE
Constructor Detail

HTML

public HTML()
Method Detail

getAllTags

public static HTML.Tag[] getAllTags()
This is the set of actual html tags that are known about the the default html reader. This set does not include tags that are manufactured by the reader.

getTag

public static HTML.Tag getTag(String tagName)
Fetch a tag constant for a well-known tag name (i.e. one of the tags in the set allTags). If the given name does not represent one of the well-known tags, then null will be returned.

getIntegerAttributeValue

public static int getIntegerAttributeValue(AttributeSet attr,
                                           HTML.Attribute key,
                                           int def)
Fetch an integer attribute value. Attribute values are stored as a string, and this is a convenience method to convert to an actual integer.
Parameters:
attr - the set of attributes to use to try to fetch a value
key - the key to use to fetch the value.
def - the default value to use if the attribute isn't defined or there is an error converting to an integer.

getAllAttributeKeys

public static HTML.Attribute[] getAllAttributeKeys()
This is the set of html attributes recognized.

getAttributeKey

public static HTML.Attribute getAttributeKey(String attName)
Fetch an attribute constant for a well-known attribute name (i.e. one of the attributes in the set allAttributes). If the given name does not represent one of the well-known attributes, then null will be returned.

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.