SimpleServlets v5.5.0

com.simpleservlets.htmlobjects
Class HTMLList

java.lang.Object
  extended by com.simpleservlets.htmlobjects.GenericHTMLElement
      extended by 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

Nested Class Summary
static class HTMLList.Item
          List item, <li> tag.
static class HTMLList.OrderedStyle
           
protected static class HTMLList.Style
           
static class HTMLList.UnorderedStyle
           
 
Field Summary
static HTMLList.UnorderedStyle CIRCLE
           
static HTMLList.UnorderedStyle DISC
           
static HTMLList.OrderedStyle LOWER_ALPHA
           
static HTMLList.OrderedStyle LOWER_ROMAN
           
static HTMLList.OrderedStyle NUMBER
           
static HTMLList.UnorderedStyle SQUARE
           
static HTMLList.OrderedStyle UPPER_ALPHA
           
static HTMLList.OrderedStyle UPPER_ROMAN
           
 
Fields inherited from interface com.simpleservlets.htmlobjects.HTMLElement
ZERO_LEN_ARRAY
 
Method Summary
 HTMLList.Item addItem()
           
 HTMLList.Item addItem(HTMLElement itemContent)
           
 HTMLList.Item addItem(String itemText)
           
static HTMLList createOrdered()
          Equivalent to: return createOrdered(NUMBER);
static HTMLList createOrdered(HTMLList.OrderedStyle style)
           
static HTMLList createUnordered()
          Equivalent to: return createUnordered(DISC);
static HTMLList createUnordered(HTMLList.UnorderedStyle style)
           
 
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
 

Field Detail

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
Method Detail

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);


SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.