DhSection | +--DhBulletedListpublic class DhBulletedList
Represents the ordered and unordered list items in HTML. This is a simple container class into which items can be added, each getting its own bullet or number, as appropriate.
Constructors
Name | Description |
---|---|
DhBulletedList() | Creates a list. |
DhBulletedList( int listType ) | Creates a list. |
Methods
Name | Description |
---|---|
getElementCount() | Returns the current number of elements in the list. |
getListType() | Retrieves the current list type. |
insert( DhElement newElement, int index ) | Inserts an element into the list at the specified index. |
item( int index ) | Retrieves the element at the specified index. |
remove( DhElement e ) | Removes the specified element from the list. |
remove( int index ) | Removes the element at the specified index from the list. |
removeAll() | Removes all the elements from the list. |
setListType( int newType ) | Sets the current list type. |
Creates a list. This default constructor creates a bulleted list (ListTypeEnum.BULLETED).
Creates a list.
IllegalArgumentException thrown if listType is not one of class constants.
Returns the number of direct children (nonrecursive count).
Returns the current number of elements in the list. Only top-level (direct children of the DhList) elements are counted.
Returns one of the constants provided in ListTypeEnum.
Retrieves the current list type.
Inserts an element into the list at the specified index. If the index is less than 0 or greater than the number of elements in the list, the element is added to the end of the list.
Retrieves the element at the specified index.
RuntimeException thrown if index is not in the list.
Returns the index of the element that was removed.
Removes the specified element from the list.
Returns the index of the element that was removed.
Removes the element at the specified index from the list.
Removes all the elements from the list.
Sets the current list type.