Class java.servlet.html.HtmlList
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.servlet.html.HtmlList

java.lang.Object
   |
   +----java.servlet.html.HtmlContainer
           |
           +----java.servlet.html.HtmlList

public class HtmlList
extends HtmlContainer
This class facilitates the creation of Html Lists. It overrides the add methods of HtmlContainer to prepend the appropriate list item tag based on the type of list it is.

Use an HtmlDefinitionList for Definition Lists


Variable Index

 o ARABIC_NUMERALS
 o CAPITAL_LETTERS
 o CAPITAL_ROMAN
 o LOWER_CASE_LETTERS
 o LOWER_CASE_ROMAN

Constructor Index

 o HtmlList()
Create Unordered List.
 o HtmlList(String)
Create a list of the given type.
 o HtmlList(String, char)
Create list of the given type, with the specified bulleting.

Method Index

 o add(HtmlElement)
Adds HtmlElement to container.
 o add(String)
Adds Text to container.
 o add(String, String)
Adds Text to container.
 o addTag(String)
Adds raw Tag to container, does not prepend <li>
 o setListItemTag(String)
explicitly set the list item tag.

Variables

 o CAPITAL_LETTERS
  public final static char CAPITAL_LETTERS
 o LOWER_CASE_LETTERS
  public final static char LOWER_CASE_LETTERS
 o CAPITAL_ROMAN
  public final static char CAPITAL_ROMAN
 o LOWER_CASE_ROMAN
  public final static char LOWER_CASE_ROMAN
 o ARABIC_NUMERALS
  public final static char ARABIC_NUMERALS

Constructors

 o HtmlList
  public HtmlList()
Create Unordered List.
 o HtmlList
  public HtmlList(String listTag)
Create a list of the given type.
Parameters:
listTag - the type of this list. Appropriate values are
ul
unordered list
ol
ordered list
dir
directory
menu
menu

use an HtmlDefinitionList for Definition Lists "dl".
 o HtmlList
  public HtmlList(String listTag,
                  char type)
Create list of the given type, with the specified bulleting.
Parameters:
listTag - the type of this list. Appropriate values are
ul
unordered list
ol
ordered list
dir
directory
menu
menu

use an HtmlDefinitionList for Definition Lists "dl".
type - the list items should be displayed with
  • "A" - Capital Letters
  • "a" - LowerCase Letters
  • "I" - Capital Roman Numerals
  • "i" - LowerCase Roman Numerals Letters
  • "1" - Arabic Numerals

Methods

 o add
  public void add(HtmlElement element)
Adds HtmlElement to container. if HtmlElement is an HtmlList add embeds the new list in this list.
Parameters:
element - The HtmlElement to be added to this container.
Overrides:
add in class HtmlContainer
 o add
  public void add(String text)
Adds Text to container.
Parameters:
text - The text to be added to this container.
Overrides:
add in class HtmlContainer
 o add
  public void add(String text,
                  String tags)
Adds Text to container.
Parameters:
text - The text to be added to this container.
tags - Comma delimmitted list of tags to wrap around this text. add("jeeves", "b, a href=jeeves.html") is equivalent to add("jeeves");
Overrides:
add in class HtmlContainer
 o addTag
  public void addTag(String tag)
Adds raw Tag to container, does not prepend <li>
Parameters:
tag - the Tag to be added to this container
Overrides:
addTag in class HtmlContainer
 o setListItemTag
  public void setListItemTag(String liTag)
explicitly set the list item tag.
Parameters:
liTag - the String to set the list item tag to

All Packages  Class Hierarchy  This Package  Previous  Next  Index