/**
  * Looks for the List object on the Stack, and adds the ListItem to the List.
  *
  * @throws DocumentException
  * @since 5.0.6
  */
 public void processListItem() throws DocumentException {
   if (stack.empty()) return;
   Element obj = stack.pop();
   if (!(obj instanceof ListItem)) {
     stack.push(obj);
     return;
   }
   if (stack.empty()) {
     document.add(obj);
     return;
   }
   ListItem item = (ListItem) obj;
   Element list = stack.pop();
   if (!(list instanceof com.itextpdf.text.List)) {
     stack.push(list);
     return;
   }
   ((com.itextpdf.text.List) list).add(item);
   item.adjustListSymbolFont();
   stack.push(list);
 }
Esempio n. 2
0
 /**
  * Sets the listsymbol of this line.
  *
  * <p>This is only necessary for the first line of a <CODE>ListItem</CODE>.
  *
  * @param listItem the list symbol
  */
 public void setListItem(ListItem listItem) {
   this.listSymbol = listItem.getListSymbol();
   this.symbolIndent = listItem.getIndentationLeft();
 }