public class UnorderedListItem extends HTMLListItem
This example creates a UnorderedListItem tag:
// Create an UnorderedList. UnorderedList list = new UnorderedList(HTMLConstants.SQUARE); // 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 UnorderedListItem tag:
<ul type="square"> <li>my list item</li> </ul>
Here is the output of the UnorderedListItem 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>
UnorderedListItem objects generate the following events:
Constructor and Description |
---|
UnorderedListItem()
Constructs a default UnorderedList object.
|
UnorderedListItem(HTMLTagElement data)
Constructs a UnorderedListItem object with the specified data.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getType()
Returns the type of the labeling scheme.
|
void |
setType(java.lang.String type)
Sets the labeling scheme to be used.
|
getDirection, getFOTag, getItemData, getLanguage, getTag, isUseFO, setDirection, setItemData, setLanguage, setUseFO, toString
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
public UnorderedListItem()
public UnorderedListItem(HTMLTagElement data)
data
- The data to use in the unordered list item.public java.lang.String getType()
public void setType(java.lang.String type)
type
- The labeling scheme. One of the following constants
defined in HTMLConstants: DISC, SQUARE, or CIRCLE.HTMLConstants