ListLevelCollection

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Cloneable, java.lang.Iterable

public class ListLevelCollection implements Cloneable, Iterable

A collection of list formatting for each level in a list.

To learn more, visit the Working with Lists documentation article.

Examples:

Shows how to apply custom list formatting to paragraphs when using DocumentBuilder.


 Document doc = new Document();

 // A list allows us to organize and decorate sets of paragraphs with prefix symbols and indents.
 // We can create nested lists by increasing the indent level.
 // We can begin and end a list by using a document builder's "ListFormat" property.
 // Each paragraph that we add between a list's start and the end will become an item in the list.
 // Create a list from a Microsoft Word template, and customize the first two of its list levels.
 List docList = doc.getLists().add(ListTemplate.NUMBER_DEFAULT);

 ListLevel listLevel = docList.getListLevels().get(0);
 listLevel.getFont().setColor(Color.RED);
 listLevel.getFont().setSize(24.0);
 listLevel.setNumberStyle(NumberStyle.ORDINAL_TEXT);
 listLevel.setStartAt(21);
 listLevel.setNumberFormat("