javax.swing.text.html
Class HTML

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.html.HTML

public class HTML
extends Object sample code for java.lang.Object definition code for java.lang.Object

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


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

Field Detail

NULL_ATTRIBUTE_VALUE sample code for javax.swing.text.html.HTML.NULL_ATTRIBUTE_VALUE

public static final String sample code for java.lang.String definition code for java.lang.String  NULL_ATTRIBUTE_VALUE
See Also:
Constant Field Values
Constructor Detail

HTML sample code for javax.swing.text.html.HTML() definition code for javax.swing.text.html.HTML()

public HTML()
Method Detail

getAllTags sample code for javax.swing.text.html.HTML.getAllTags() definition code for javax.swing.text.html.HTML.getAllTags()

public static HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag [] getAllTags()
Returns the set of actual HTML tags that are recognized by the default HTML reader. This set does not include tags that are manufactured by the reader.


getTag sample code for javax.swing.text.html.HTML.getTag(java.lang.String) definition code for javax.swing.text.html.HTML.getTag(java.lang.String)

public static HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag  getTag(String sample code for java.lang.String definition code for java.lang.String  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}. If the given name does not represent one of the well-known tags, then null will be returned.

Parameters:
tagName - the String name requested
Returns:
a tag constant corresponding to the tagName, or null if not found

getIntegerAttributeValue sample code for javax.swing.text.html.HTML.getIntegerAttributeValue(javax.swing.text.AttributeSet, javax.swing.text.html.HTML.Attribute, int) definition code for javax.swing.text.html.HTML.getIntegerAttributeValue(javax.swing.text.AttributeSet, javax.swing.text.html.HTML.Attribute, int)

public static int getIntegerAttributeValue(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr,
                                           HTML.Attribute sample code for javax.swing.text.html.HTML.Attribute definition code for javax.swing.text.html.HTML.Attribute  key,
                                           int def)
Fetches 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 sample code for javax.swing.text.html.HTML.getAllAttributeKeys() definition code for javax.swing.text.html.HTML.getAllAttributeKeys()

public static HTML.Attribute sample code for javax.swing.text.html.HTML.Attribute definition code for javax.swing.text.html.HTML.Attribute [] getAllAttributeKeys()
Returns the set of HTML attributes recognized.

Returns:
the set of HTML attributes recognized

getAttributeKey sample code for javax.swing.text.html.HTML.getAttributeKey(java.lang.String) definition code for javax.swing.text.html.HTML.getAttributeKey(java.lang.String)

public static HTML.Attribute sample code for javax.swing.text.html.HTML.Attribute definition code for javax.swing.text.html.HTML.Attribute  getAttributeKey(String sample code for java.lang.String definition code for java.lang.String  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}). If the given name does not represent one of the well-known attributes, then null will be returned.

Parameters:
attName - the String requested
Returns:
the Attribute corresponding to attName