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
-
ARABIC_NUMERALS
-
-
CAPITAL_LETTERS
-
-
CAPITAL_ROMAN
-
-
LOWER_CASE_LETTERS
-
-
LOWER_CASE_ROMAN
-
-
HtmlList()
- Create Unordered List.
-
HtmlList(String)
- Create a list of the given type.
-
HtmlList(String, char)
- Create list of the given type, with the specified bulleting.
-
add(HtmlElement)
- Adds HtmlElement to container.
-
add(String)
- Adds Text to container.
-
add(String, String)
- Adds Text to container.
-
addTag(String)
- Adds raw Tag to container, does not prepend <li>
-
setListItemTag(String)
- explicitly set the list item tag.
CAPITAL_LETTERS
public final static char CAPITAL_LETTERS
LOWER_CASE_LETTERS
public final static char LOWER_CASE_LETTERS
CAPITAL_ROMAN
public final static char CAPITAL_ROMAN
LOWER_CASE_ROMAN
public final static char LOWER_CASE_ROMAN
ARABIC_NUMERALS
public final static char ARABIC_NUMERALS
HtmlList
public HtmlList()
- Create Unordered List.
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".
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
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
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
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
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
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