com.simpleservlets.htmlobjects
Class HTMLList
java.lang.Object
com.simpleservlets.htmlobjects.GenericHTMLElement
com.simpleservlets.htmlobjects.HTMLList
- All Implemented Interfaces:
- DoNotMinimizeEmpty, HTMLElement
public class HTMLList
- extends GenericHTMLElement
- implements HTMLElement, DoNotMinimizeEmpty
Lists, <ul> tag and <ol> tag.
Use the static methods createUnordered() and
createOrdered() to get an instanace. Then use addItem()
to add to the list. This example:
HTMLList list = HTMLList.createUnordered(HTMLList.DISC);
list.addItem("apple");
list.addItem("banana");
list.addItem("orange");
produces this HTML output:
<ul type="disc">
<li>apple</li>
<li>banana</li>
<li>orange</li>
</ul>
- Author:
- Paul Hyde
| Methods inherited from class com.simpleservlets.htmlobjects.GenericHTMLElement |
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setSafeToWrapWithWhitespace, setStyle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.simpleservlets.htmlobjects.HTMLElement |
add, add, addSibling, addSibling, getAttributes, getChildren, getName, getParent, hasAttributes, hasChildren, isSafeToWrapWithWhitespace, removeAllAttributes, removeAllChildren, removeAttribute, removeChild, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeGroup, setParent, setStyle |
DISC
public static final HTMLList.UnorderedStyle DISC
SQUARE
public static final HTMLList.UnorderedStyle SQUARE
CIRCLE
public static final HTMLList.UnorderedStyle CIRCLE
NUMBER
public static final HTMLList.OrderedStyle NUMBER
LOWER_ALPHA
public static final HTMLList.OrderedStyle LOWER_ALPHA
UPPER_ALPHA
public static final HTMLList.OrderedStyle UPPER_ALPHA
LOWER_ROMAN
public static final HTMLList.OrderedStyle LOWER_ROMAN
UPPER_ROMAN
public static final HTMLList.OrderedStyle UPPER_ROMAN
addItem
public HTMLList.Item addItem(HTMLElement itemContent)
addItem
public HTMLList.Item addItem(String itemText)
addItem
public HTMLList.Item addItem()
createUnordered
public static HTMLList createUnordered(HTMLList.UnorderedStyle style)
createUnordered
public static HTMLList createUnordered()
- Equivalent to: return createUnordered(DISC);
createOrdered
public static HTMLList createOrdered(HTMLList.OrderedStyle style)
createOrdered
public static HTMLList createOrdered()
- Equivalent to: return createOrdered(NUMBER);
Copyright © 2001-2007
Programix Incorporated.
All rights reserved.
SimpleServlets is free
and is
OSI Certified
Open Source Software under the BSD
license.