aspose.pdf
Class ListSection

java.lang.Object
  extended by aspose.pdf.Section
      extended by aspose.pdf.ListSection

public class ListSection
extends Section

An object to display different lists.

Typical usages are the following:

[Java] Pdf pdf = new Pdf(); ListSection tocsec = new ListSection("Table of contents"); pdf.getSections().add(tocsec); Text text = tocsec.getTitle(); text.getSegments().getSegment(0).getTextInfo().setFontName("Helvetica"); text.getSegments().getSegment(0).getTextInfo().setFontSize(16); text.getMargin().setBottom(20); tocsec.getListFormatArray().setLength(4); tocsec.getListFormatArray().getListLevelFormat(0).setLeftMargin(0); tocsec.getListFormatArray().getListLevelFormat(0).getTextInfo().setFontName("Helvetica"); tocsec.getListFormatArray().getListLevelFormat(0).getTextInfo().setFontSize(24); tocsec.getListFormatArray().getListLevelFormat(1).setLeftMargin(5); tocsec.getListFormatArray().getListLevelFormat(1).getTextInfo().setFontName("Helvetica"); tocsec.getListFormatArray().getListLevelFormat(1).getTextInfo().setFontSize(20); tocsec.getListFormatArray().getListLevelFormat(2).setLeftMargin(10); tocsec.getListFormatArray().getListLevelFormat(2).getTextInfo().setFontName("Helvetica"); tocsec.getListFormatArray().getListLevelFormat(2).getTextInfo().setFontSize(14); //tocsec.getListFormatArray().getListLevelFormat(2).getTextInfo().setIsTrueTypeFontBold(true); tocsec.getListFormatArray().getListLevelFormat(3).setLeftMargin(15); tocsec.getListFormatArray().getListLevelFormat(3).getTextInfo().setFontName("Helvetica"); tocsec.getListFormatArray().getListLevelFormat(3).getTextInfo().setFontSize(10); //tocsec.getListFormatArray().getListLevelFormat(3).getTextInfo().setIsTrueTypeFontBold(true); tocsec.setListType(ListType.TableOfContents); Section sec = pdf.getSections().add(); for(int level = 1;level!=5;level++) { Heading heading2 = new Heading(pdf,sec,level); Segment seg2 = new Segment(heading2); heading2.getSegments().add(seg2); heading2.setIsAutoSequence(true); seg2.setContent("this is heading of level"); heading2.setIsInList(true); sec.getParagraphs().add(heading2); } Table table1 = new Table(); sec.getParagraphs().add(table1); table1.setColumnWidths("70 2cm"); table1.setTitle("Table 1"); Row row1 = table1.getRows().add(); Cell cellRow1 = row1.getCells().add("ColumnsSpan = 2"); cellRow1.setColumnsSpan(2); cellRow1.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f,new Color("Red"))); table1.setIsInList(true); Image image1 = new Image(); sec.getParagraphs().add(image1); image1.getImageInfo().setFile("C:/118528527.jpg"); image1.getImageInfo().setImageFileType(ImageFileType.Jpeg); GraphNote note1 = new GraphNote(); note1.setContent("This is a note1"); note1.setPosX(50); note1.setPosY(100); image1.getImageNotes().add(note1); image1.setIsInList(true); Graph graph1 = new Graph(400,400); sec.getParagraphs().add(graph1); float[] posArr = new float[]{0,0,200,80,300,40,350,90}; Curve curve1 = new Curve(graph1,posArr); graph1.getShapes().add(curve1); graph1.setIsInList(true); pdf.save(....); [XML] <?xml version="1.0" encoding="utf-8"?> <Pdf> <ListSection ListType="TableOfContents"> <Title Alignment="Center"> <Segment IsTrueTypeFontBold="true" FontSize="30"> TableOfContents </Segment> </Title> <ListLevelFormat Level="1" LeftMargin="0"> <TextInfo IsTrueTypeFontBold="true" IsTrueTypeFontItalic="true"> </TextInfo> </ListLevelFormat> <ListLevelFormat Level="2" LeftMargin="10"> <TextInfo IsUnderline="true" FontSize="10"> </TextInfo> </ListLevelFormat> <ListLevelFormat Level="3" LeftMargin="20"> <TextInfo IsTrueTypeFontBold="true"> </TextInfo> </ListLevelFormat> <ListLevelFormat Level="4" LeftMargin="30"> <TextInfo IsTrueTypeFontBold="true"> </TextInfo> </ListLevelFormat> </ListSection> <ListSection ListType="ListOfTables"> <Title> <Segment IsTrueTypeFontBold="true" FontSize="30">ListOfTables</Segment> </Title> </ListSection> <ListSection ListType="ListOfFigures"> <Title> <Segment IsTrueTypeFontBold="true" FontSize="30">ListOfFigures</Segment> </Title> </ListSection> <Section> <Heading level="1" IsAutoSequence="true" IsInList="true"> <Segment>this is heading of level 1</Segment> </Heading> <Heading level="2" IsAutoSequence="true" IsInList="true"> <Segment>this is heading of level 2</Segment> </Heading> <Heading level="3" IsAutoSequence="true" IsInList="true"> <Segment>this is heading of level 3</Segment> </Heading> <Heading level="4" IsAutoSequence="true" IsInList="true"> <Segment>this is heading of level 4</Segment> </Heading> <Table ColumnWidths="70 2cm" IsInList="true"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"/> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"/> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"/> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> <Image File="C:/118528527.jpg" Type="jpeg" IsInList="true"> <Note Position="50 100">this is note1</Note> <Title>mm picture</Title> </Image> <Graph Height="100" Width="400" IsInList="true"> <Curve Position="0 0 200 80 300 40 350 90"/> <Title>one curve</Title> </Graph> </Section> </Pdf>


Field Summary
 
Fields inherited from class aspose.pdf.Section
CurColumnPosY, FirstPageNumber, IsNewPageCreated, IsWidowOrphanControlSet, PagesNumber, RealFooterMarginBottom, RealPageBottom, watermark
 
Constructor Summary
ListSection(Pdf doc)
          Set the default title of listSection.
ListSection(java.lang.String listTitle)
          Represents a ListSection action
 
Method Summary
 java.lang.String getInternalIdTag()
          Get tag of the internal Id.
 boolean getIsCaptionLabelNeeded()
          Gets a bool value that indicates whether caption label is needed in TOC.
 FormatArray getListFormatArray()
          Gets the format of the lists of all levels using the FormatArray.
 void getListFormatArray(FormatArray value)
          Sets the format of the lists of all levels using the FormatArray.
 ListType getListType()
          Gets the ListType of the ListSection object.
 Text getTitle()
          Gets the Text value of the title of ListSection.
 void setIsCaptionLabelNeeded(boolean value)
          Sets a bool value that indicates whether caption label is needed in TOC.
 void setListType(ListType value)
          Sets the ListType of the ListSection object.
 void setTitle(Text value)
          Sets the Text value of the title of ListSection.
 
Methods inherited from class aspose.pdf.Section
addParagraph, clone, completeClone, getAdditionalEvenFooter, getAdditionalEvenHeader, getAdditionalOddFooter, getAdditionalOddHeader, getBackgroundColor, getBackgroundImageFile, getBackgroundImageFixedWidth, getBackgroundImageType, getColumnInfo, getEndNoteNumberInSection, getEvenFooter, getEvenHeader, getFirstLineIndent, getFootNoteNumberInPage, getFootNoteNumberInSection, getGraphInfo, getHasColumnLine, getID, getIsAutoHyphenated, getIsBackgroundImageBlackWhite, getIsDisabled, getIsEmpty, getIsFirstParaWritten, getIsFullPage, getIsHasNextColumnFlag, getIsInitialized, getIsLandscape, getIsNewColumn, getIsNewPage, getIsPageNumberRestarted, getIsSpaced, getIsWidowOrphanControlEnabled, getObjectByID, getOddFooter, getOddHeader, getPageCount, getPageInfo, getPageRotatingAngle, getParagraphs, getPdf, getStartingPageNumber, getTextInfo, getWatermark, insertFooter, insertHeader, isSameSize, setAdditionalEvenFooter, setAdditionalEvenHeader, setAdditionalOddFooter, setAdditionalOddHeader, setBackgroundColor, setBackgroundImageFile, setBackgroundImageFixedWidth, setBackgroundImageType, setColumnInfo, setEndNoteNumberInSection, setEvenFooter, setEvenHeader, setFirstLineIndent, setFootNoteNumberInPage, setFootNoteNumberInSection, setGraphInfo, setHasColumnLine, setID, setIsAutoHyphenated, setIsBackgroundImageBlackWhite, setIsDisabled, setIsFirstParaWritten, setIsFullPage, setIsHasNextColumnFlag, setIsInitialized, setIsLandscape, setIsNewColumn, setIsNewPage, setIsPageNumberRestarted, setIsSpaced, setIsWidowOrphanControlEnabled, setOddFooter, setOddHeader, setPageCount, setPageInfo, setPageRotatingAngle, setParagraphs, setPdf, setStartingPageNumber, setTextInfo, setWatemark
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSection

public ListSection(java.lang.String listTitle)
Represents a ListSection action

Parameters:
listTitle -

ListSection

public ListSection(Pdf doc)
Set the default title of listSection.

Parameters:
doc -
Method Detail

getTitle

public Text getTitle()
Gets the Text value of the title of ListSection.


setTitle

public void setTitle(Text value)
Sets the Text value of the title of ListSection.

Parameters:
value -

getIsCaptionLabelNeeded

public boolean getIsCaptionLabelNeeded()
Gets a bool value that indicates whether caption label is needed in TOC.


setIsCaptionLabelNeeded

public void setIsCaptionLabelNeeded(boolean value)
Sets a bool value that indicates whether caption label is needed in TOC.

Parameters:
value -

getListFormatArray

public FormatArray getListFormatArray()
Gets the format of the lists of all levels using the FormatArray.


getListFormatArray

public void getListFormatArray(FormatArray value)
Sets the format of the lists of all levels using the FormatArray.

Parameters:
value -

getListType

public ListType getListType()
Gets the ListType of the ListSection object.


setListType

public void setListType(ListType value)
Sets the ListType of the ListSection object.

Parameters:
value -

getInternalIdTag

public java.lang.String getInternalIdTag()
Get tag of the internal Id.