com.ibm.as400.util.html

Class 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>&#202;</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 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