Class OrderedListItem

  • All Implemented Interfaces:

    public class OrderedListItem
    extends HTMLListItem
    The OrderedListItem class represents an item in an ordered list item.

    This example creates a OrderedListItem tag:

      // Create an OrderedList.
      OrderedList list = new OrderedList(HTMLConstants.CAPITALS);
      // 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.

    Here is the output of the OrderedListItem tag:

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

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

      <fo:list-item-body><fo:block-container><fo:block>my list item</fo:block>

    OrderedListItem objects generate the following events:

    • PropertyChangeEvent
    See Also:
    Serialized Form
    • Constructor Detail

      • OrderedListItem

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

        public OrderedListItem(HTMLTagElement data)
        Constructs a OrderedListItem object with the specified list item data.
        data - The data to use in the ordered list item.
    • Method Detail

      • getType

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

        public int getValue()
        Returns the number for the current list item
        The number.
      • 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.).
        type - The order labeling scheme. One of the following constants defined in HTMLConstants: NUMBERS, CAPITALS, LOWER_CASE, LARGE_ROMAN, or SMALL_ROMAN.
        See Also:
      • setValue

        public void setValue(int value)
        Sets a number other than the incremented value for the current List Item (LI) in an Ordered List (OL.) It is thus possible to create a non-sequential list. Values are automatically converted to the TYPE attribute, if present, of the parent OL element or current LI element. The number value must be a positive integer.
        value - The ordered list item value.