com.ibm.as400.util.html

Class OrderedList

  • All Implemented Interfaces:
    HTMLTagElement, java.io.Serializable


    public class OrderedList
    extends HTMLList
    The OrderedList class represents an HTML ordered list, <ol>.

    This example creates a OrderedList tag:

      // Create an OrderedList.
      OrderedList list = new OrderedList();
      
      // Use large roman numerals when displaying the list items.
      list.setType(HTMLConstants.LARGE_ROMAN);
      
      // Create an OrderedListItem.
      OrderedListItem listItem = new OrderedListItem();
      
      // Set the data in the list item.
      listItem.setItemData(new HTMLText("my list item"));
      
      // Add the list item to the OrderedList.
      list.addListItem(listItem);
      System.out.println(list.toString());
      

    Here is the output of the OrderedList tag:

      <ol type="I">
      <li>my list item</li>
      </ol>
      

    Here is the output of the OrderedList tag using XSL Formatting Objects:

      <fo:block-container>
      <fo:list-block>
      <fo:list-item>
      <fo:list-item-label>I.</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>
      

    OrderedList objects generate the following events:

    • PropertyChangeEvent
    See Also:
    Serialized Form
    • Constructor Detail

      • OrderedList

        public OrderedList()
        Constructs a default OrderedList object.
      • OrderedList

        public OrderedList(java.lang.String type)
        Constructs a OrderedList object with the specified order labeling type.
        Parameters:
        type - The order labeling used to display the ordered list. One of the following constants defined in HTMLConstants: NUMBERS, CAPITALS, LOWER_CASE, LARGE_ROMAN, or SMALL_ROMAN.
    • Method Detail

      • getStartingSequenceNumber

        public int getStartingSequenceNumber()
        Returns the starting number in the order labeling.
        Returns:
        The starting number.
      • getTag

        public java.lang.String getTag()
        Returns the tag for the ordered list.
        Returns:
        The tag.
      • getFOTag

        public java.lang.String getFOTag()
        Returns the XSL-FO tag for the ordered list.
        Returns:
        The tag.
      • getType

        public java.lang.String getType()
        Returns the type of the order labeling.
        Returns:
        The type.
      • setType

        public void setType(java.lang.String type)
        Sets the order labeling to be used. The default order is by number, (1, 2, 3, etc.).
        Parameters:
        type - The order labeling scheme. One of the following constants defined in HTMLConstants: NUMBERS, CAPITALS, LOWER_CASE, LARGE_ROMAN, or SMALL_ROMAN.
        See Also:
        HTMLConstants
      • setStartingSequenceNumber

        public void setStartingSequenceNumber(int start)
        Sets the starting number to something other than "1" to use in incrementing the list structure. Values are automatically converted to the TYPE attribute, if present. The starting number must be a positive integer.
        Parameters:
        start - The ordered list starting number.