com.ibm.as400.util.html
Class UnorderedList
- java.lang.Object
-
- com.ibm.as400.util.html.HTMLTagAttributes
-
- com.ibm.as400.util.html.HTMLList
-
- com.ibm.as400.util.html.UnorderedList
-
- All Implemented Interfaces:
- HTMLTagElement, java.io.Serializable
public class UnorderedList extends HTMLList
The UnorderedList class represents an HTML unordered list, <ul>.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:
- PropertyChangeEvent
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description UnorderedList()
Constructs a default UnorderedList object.UnorderedList(java.lang.String type)
Constructs a UnorderedList object with the specified labeling type.
-
Method Summary
Methods 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.-
Methods inherited from class com.ibm.as400.util.html.HTMLList
addList, addListItem, addListItemElementListener, getDirection, getItemCount, getItems, getLanguage, isCompact, isUseFO, removeList, removeListItem, removeListItemElementListener, setCompact, setDirection, setItems, setLanguage, setUseFO, toString
-
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
-
-
-
-
Constructor Detail
-
UnorderedList
public UnorderedList()
Constructs a default UnorderedList object.
-
UnorderedList
public UnorderedList(java.lang.String type)
Constructs a UnorderedList object with the specified labeling type.- Parameters:
type
- The labeling scheme used to display the list. One of the following constants defined in HTMLConstants: DISC, SQUARE, or CIRCLE.
-
-
Method Detail
-
getType
public java.lang.String getType()
Returns the type of the labeling scheme.- Returns:
- The type.
-
getTag
public java.lang.String getTag()
Returns the tag for the unordered list.- Returns:
- The tag.
-
getFOTag
public java.lang.String getFOTag()
Returns the XSL-FO tag for the unordered list.- Returns:
- The tag.
-
setType
public void setType(java.lang.String type)
Sets the labeling scheme to be used. The default scheme is disc.- Parameters:
type
- The labeling scheme. One of the following constants defined in HTMLConstants: DISC, SQUARE, or CIRCLE.- See Also:
HTMLConstants
-
-