ceTe Software Help Library for Java August - 2020
DynamicPDF Generator for Java / Programming with Generator for Java / Page Elements / Lists
In This Topic
    Lists
    In This Topic

    A 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: An Ordered List is a list which arranges the Items with Numbers as the index. For different types of number formats see the  NumberingStyle class.
    • Unordered List: An UnOrdered List is a list which arranges the Items with bullets as the index. For setting the different types of bullets see the UnorderedListStyle Class.
    Custom bullets can also be created by using the UnorderedListStyle class. Under ListItems SubLists is an option. There are two types of SubLists.
    • 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 an 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( "Professional Edition" );
        ListItem item8 = subList3.getListItems().add( "Enterprise Edition" );
        page.getElements().add( list ); 
    
    See Also