public class ListLevelFormat extends XmlEntityWithInternals
An object to define the format of the list of some level.
[Java] // Create a Pdf object Pdf pdf = new Pdf(); //Create a list section ListSection tocSection = new ListSection("Table Of Contents"); //Set its list type as table of of contents tocSection.setListType ( ListType.TableOfContents); //Define the format of the four levels list by setting the left margins and //text format settings of each level tocSection.getListFormatArray().setLength ( 4); // specify the left margin information for list element at level 0 tocSection.getListFormatArray().get_Item(0).setLeftMargin ( 0); tocSection.getListFormatArray().get_Item(0).getTextInfo().setIsTrueTypeFontBold ( true); tocSection.getListFormatArray().get_Item(0).getTextInfo().setIsTrueTypeFontItalic ( true); tocSection.getListFormatArray().get_Item(0).getTextInfo().setColor ( new aspose.pdf.generator.Color("Navy")); tocSection.getListFormatArray().get_Item(1).setLeftMargin ( 10); tocSection.getListFormatArray().get_Item(1).getTextInfo().setIsUnderline ( true); tocSection.getListFormatArray().get_Item(1).getTextInfo().setFontSize ( 10); tocSection.getListFormatArray().get_Item(2).setLeftMargin ( 20); tocSection.getListFormatArray().get_Item(2).getTextInfo().setIsTrueTypeFontBold ( true); tocSection.getListFormatArray().get_Item(3).setLeftMargin ( 30); tocSection.getListFormatArray().get_Item(3).getTextInfo().setIsTrueTypeFontBold ( true); //Add the list section to the sections collection of the Pdf document pdf.getSections.add(tocSection); //Create a section in the Pdf document aspose.pdf.generator.Section sec1 = pdf.getSections().add(); //Add four headings in the section for (int Level = 1; Level != 5; Level++) { // create heading object and add set its level Heading heading2 = new Heading(pdf, sec1, Level); // create a segment object and Segment segment2 = new Segment(heading2); // add the segment object to segments collection of Heading heading2.getSegments().add(segment2); // Set the property so that number of the heading is in an automatical sequence. heading2.setIsAutoSequence ( true); // Specify the content of Heading segment2.setContent ( "this is heading of level "); segment2.setContent ( segment2.getContent() + Level.ToString()); //Add the heading into Table Of Contents. heading2.setIsInList ( true); // add the heading to paragraphs collection of PDF section sec1.getParagraphs().add(heading2); } // save the PDF document pdf.save("d:/pdftest/ListLevelFormat_Test.pdf");
Modifier and Type | Field and Description |
---|---|
int |
_TabLeaderType
Gets or sets a
TabLeaderType object that indicates the tab leader type for the
list. |
float |
LeftMargin
Gets or sets a float value that indicates the left margin of the list of current level.
|
MarginInfo |
Margin
Gets or sets a
MarginInfo object that indicates the margin of the list item. |
int |
SubsequentLinesIndent
Gets or sets a int value that indicates how many chars are indented for the subsequent lines
in the list item.
|
TextInfo |
TextInfo
Get or set the
TextInfo object of the list of current level. |
Constructor and Description |
---|
ListLevelFormat() |
public TextInfo TextInfo
Get or set the TextInfo
object of the list of current level.
public float LeftMargin
Gets or sets a float value that indicates the left margin of the list of current level.
The unit is point. In XML,the default unit is point,but cm and inch are also supported.
For example,"10cm" or "5inch".
<BLOCKQUOTE class="dtBlock">
<Font color="red">NOTE: This property is now obsolete.</Font></BLOCKQUOTE>
<BLOCKQUOTE class="dtBlock">
Please use Margin property instead.
It will be removed 12 months later since release 3.3.1.0 in January 2007. Aspose apologizes for
any inconvenience you may have experienced.</BLOCKQUOTE>
public MarginInfo Margin
Gets or sets a MarginInfo
object that indicates the margin of the list item.
public int _TabLeaderType
Gets or sets a TabLeaderType
object that indicates the tab leader type for the
list. The default value is "Dot".
public int SubsequentLinesIndent
Gets or sets a int value that indicates how many chars are indented for the subsequent lines in the list item. The default value is 6.
Copyright © 2014 Aspose. All Rights Reserved.