public class UnorderedList extends HTMLList
This example creates a UnorderedList tag:
// Create an UnorderedList. UnorderedList list = new UnorderedList(); // Use circles when displaying the list items. list.setType(HTMLConstants.CIRCLE); // Create an UnorderedListItem. UnorderedListItem listItem = new UnorderedListItem(); // Set the data in the list item. listItem.setItemData(new HTMLText("my list item")); // Add the list item to the UnorderedList. list.addListItem(listItem); System.out.println(list.toString());
Here is the output of the UnorderedList tag:
<ul type="circle"> <li>my list item</li> </ul>
Here is the output of the UnorderedList tag using XSL-Formatting Objects:
<fo:block-container> <fo:list-block> <fo:list-item> <fo:list-item-label>Ê</fo:list-item-label> <fo:list-item-body><fo:block-container><fo:block>my list item</fo:block> </fo:block-container> </fo:list-item-body> </fo:list-item> </fo:list-block> </fo:block-container>
UnorderedList objects generate the following events:
Constructor and Description |
---|
UnorderedList()
Constructs a default UnorderedList object.
|
UnorderedList(java.lang.String type)
Constructs a UnorderedList object with the specified labeling type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFOTag()
Returns the XSL-FO tag for the unordered list.
|
java.lang.String |
getTag()
Returns the tag for the unordered list.
|
java.lang.String |
getType()
Returns the type of the labeling scheme.
|
void |
setType(java.lang.String type)
Sets the labeling scheme to be used.
|
addList, addListItem, addListItemElementListener, getDirection, getItemCount, getItems, getLanguage, isCompact, isUseFO, removeList, removeListItem, removeListItemElementListener, setCompact, setDirection, setItems, setLanguage, setUseFO, toString
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
public UnorderedList()
public UnorderedList(java.lang.String type)
type
- The labeling scheme used to display the list. One of the following
constants defined in HTMLConstants: DISC, SQUARE, or CIRCLE.public java.lang.String getType()
public java.lang.String getTag()
public java.lang.String getFOTag()
public void setType(java.lang.String type)
type
- The labeling scheme. One of the following constants
defined in HTMLConstants: DISC, SQUARE, or CIRCLE.HTMLConstants