List is a page element which contains collection of Items arranged in a sequential order.
The List can be categorized into two types.
- Ordered List: Ordered List is a list which arranges the Items with Numbers as the index. For different types of number formats see NumberingStyle class.
- Unordered List: UnOrdered List is a list which arranges the Items with bullets as the index. For setting the different types of bullets see UnorderedListStyle Class.
- OrderedSubList
- UnOrderedSubList
Set the properties of the List either in the Main List level or subList Level or ListItem Level. If the Listed Items in the List goes beyond the given height of the List it is called Overflow. Using the OrderedList/UnorderedList GetOverflow methods to flow the List onto other pages.
The following example shows how to create Ordered List in a Document.
[Java]
OrderedList list = new OrderedList( 50, 120, 300, 500 );
list.setListItemTopMargin(5);
list.setListItemBottomMargin(5);
list.setBulletPrefix("(");
list.setBulletSuffix(")");
ListItem item1 = list.getListItems().add( ".NET products" );
item1.setUnderline(true);
ListItem item2 = list.getListItems().add( "Java products" );
item2.setUnderline(true);
OrderedSubList subList1 = item1.getSubLists().addOrderedSubList( NumberingStyle.ROMAN_UPPERCASE );
ListItem item3 = subList1.getListItems().add( "DynamicPDF™ Generator for .NET" );
ListItem item4 = subList1.getListItems().add( "DynamicPDF™ Merger for .NET" );
OrderedSubList subList2 = item2.getSubLists().addOrderedSubList( NumberingStyle.ROMAN_UPPERCASE );
ListItem item5 = subList2.getListItems().add( "DynamicPDF™ Generator for Java" );
ListItem item6 = subList2.getListItems().add( "DynamicPDF™ Merger for Java" );
OrderedSubList subList3 = item3.getSubLists().addOrderedSubList( NumberingStyle.ALPHABETIC_LOWERCASE );
ListItem item7 = subList3.getListItems().add( "Community Edition" );
ListItem item8 = subList3.getListItems().add( "Professional Edition" );
ListItem item9 = subList3.getListItems().add( "Enterprise Edition" );
page.getElements().add( list ); | See Also |
List Class | Ordered List | Unordered List Class | OrderedSubList Class | UnorderedSubList Class | Page elements | Programming with Generator for Java

