com.aspose.pdf.elements
Class Section

java.lang.Object
  extended by com.aspose.pdf.elements.PdfElementBase
      extended by com.aspose.pdf.elements.Section
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ListSection

public class Section
extends PdfElementBase

Represents a section in a Pdf document.


Constructor Summary
Section(Pdf pdf)
          Initializes a new instance of the Section class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 Color getBackgroundColor()
          Gets a Color object that indicates the background color of the section.
 java.lang.String getBackgroundImageFile()
          Gets a string that indicates the background image file name.
 float getBackgroundImageFixedHeight()
          Gets a float value that indicates the fixed height of the background image.
 float getBackgroundImageFixedWidth()
          Gets a float value that indicates the fixed width of the background image.
 ColumnInfo getColumnInfo()
          Gets a ColumnInfo object that indicates the columns info.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 HeaderFooter getEvenFooter()
          Gets a HeaderFooter object that indicates the even footer of the section.
 HeaderFooter getEvenHeader()
          Gets a HeaderFooter object that indicates the even header of the section.
 int getFirstLineIndent()
          Gets an int value that indicates the blank space at the beginning of the section.
 HeaderFooter getFirstPageFooter()
          Gets a HeaderFooter object that indicates the first page footer of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the first page footer is needed.
 HeaderFooter getFirstPageHeader()
          Gets a HeaderFooter object that indicates the first page header of the section.
 GraphInfo getGraphInfo()
          Gets a GraphInfo that indicates graph info of the section.
 HeaderFooter getLastPageFooter()
          Gets a HeaderFooter object that indicates the last page footer of the section.
 HeaderFooter getLastPageHeader()
          Gets a HeaderFooter object that indicates the lasgt page header of the section.
 HeaderFooter getOddFooter()
          Gets a HeaderFooter object that indicates the odd footer of the section.
 HeaderFooter getOddHeader()
          Gets a HeaderFooter object that indicates the odd header of the section.
 int getPageRotatingAngle()
          Gets the number of degrees by which the page should be rotated clockwise when displayed or printed.
 PageSetup getPageSetup()
          Gets a PageSetup that indicates page info of the section.
 Paragraphs getParagraphs()
          Gets a Paragraph collection that indicates all paragraphs in the section.
 Pdf getPdf()
          Gets the pdf document.
 int getStartingPageNumber()
          Gets a int value that indicates the starting page number of the section.
 TextInfo getTextInfo()
           
 boolean isBackgroundImageBlackWhite()
          Gets a bool value that indicates whether the image is forced to be black-and-white.
 boolean isDisabled()
          Gets a bool value that indicates whether this section is disabled.
 boolean isLandscape()
          Gets a bool value that indicates whether the page orientation is landscape.
 boolean isNewColumn()
          Gets a bool value that indicates whether the section starts at new column.Default is true.
 void isNewColumn(boolean isNewColumn)
          Sets a bool value that indicates whether the section starts at new column.Default is true.
 boolean isPageNumberRestarted()
          Gets a bool value that indicates whether the page number be restarted at this section.
 void isPageNumberRestarted(boolean pageNumberRestarted)
          Sets a bool value that indicates whether the page number be restarted at this section.
 boolean isSpaced()
          Gets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown.
 void setBackgroundColor(Color color)
          Sets a Color object that indicates the background color of the section.
 void setBackgroundImageFile(java.lang.String imageFile)
          Sets a string that indicates the background image file name.
 void setBackgroundImageFixedHeight(float imageFixedHeight)
          Sets a float value that indicates the fixed height of the background image.
 void setBackgroundImageFixedWidth(float imageFixedWidth)
          Sets a float value that indicates the fixed width of the background image.
 void setColumnInfo(ColumnInfo info)
          Sets a ColumnInfo object that indicates the columns info.
 void setEvenFooter(HeaderFooter footer)
          Sets a HeaderFooter object that indicates the even footer of the section.
 void setEvenHeader(HeaderFooter header)
          Sets a HeaderFooter object that indicates the even header of the section.
 void setFirstLineIndent(int indent)
          Sets an int value that indicates the blank space at the beginning of the section.
 void setFirstPageFooter(HeaderFooter firstPageFooter)
          Sets a HeaderFooter object that indicates the first page footer of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the first page footer is needed.
 void setFirstPageHeader(HeaderFooter firstPageHeader)
          Sets a HeaderFooter object that indicates the first page header of the section.
 void setGraphInfo(GraphInfo graphInfo)
          Sets a GraphInfo that indicates graph info of the section.
 void setIsBackgroundImageBlackWhite(boolean backgroundImageBlackWhite)
          Sets a bool value that indicates whether the image is forced to be black-and-white.
 void setIsDisabled(boolean disabled)
          Sets a bool value that indicates whether this section is disabled.
 void setIsLandscape(boolean landscape)
          Sets a bool value that indicates whether the page orientation is landscape.
 void setIsSpaced(boolean isSpaced)
          Sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown.
 void setLastPageFooter(HeaderFooter lastPageFooter)
          Sets a HeaderFooter object that indicates the last page footer of the section.
 void setLastPageHeader(HeaderFooter lastPageHeader)
          Sets a HeaderFooter object that indicates the last page header of the section.
 void setOddFooter(HeaderFooter oddFooter)
          Sets a HeaderFooter object that indicates the odd footer of the section.
 void setOddHeader(HeaderFooter oddHeader)
          Sets a HeaderFooter object that indicates the odd header of the section.
 void setPageRotatingAngle(int rotatingAngle)
          Sets the number of degrees by which the page should be rotated clockwise when displayed or printed.
 void setPageSetup(PageSetup pageSetup)
          Sets a PageSetup that indicates page info of the section.
 void setParagraphs(Paragraphs paragraphs)
          Sets a Paragraph collection that indicates all paragraphs in the section.
 void setStartingPageNumber(int startingPageNumber)
          Sets a int value that indicates the starting page number of the section.
 void setTextInfo(TextInfo textInfo)
           
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Section

public Section(Pdf pdf)
        throws AsposeBaseException
Initializes a new instance of the Section class.

Parameters:
pdf - the pdf document that owns the Section.
Throws:
AsposeBaseException
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: PdfElementBase
Clone an object.

Overrides:
clone in class PdfElementBase
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

getBackgroundColor

public Color getBackgroundColor()
Gets a Color object that indicates the background color of the section.


setBackgroundColor

public void setBackgroundColor(Color color)
Sets a Color object that indicates the background color of the section.


getBackgroundImageFile

public java.lang.String getBackgroundImageFile()
Gets a string that indicates the background image file name.


setBackgroundImageFile

public void setBackgroundImageFile(java.lang.String imageFile)
Sets a string that indicates the background image file name.


getBackgroundImageFixedWidth

public float getBackgroundImageFixedWidth()
Gets a float value that indicates the fixed width of the background image.


setBackgroundImageFixedWidth

public void setBackgroundImageFixedWidth(float imageFixedWidth)
Sets a float value that indicates the fixed width of the background image. If this property is not set, the image size will be the image's real size.


getBackgroundImageFixedHeight

public float getBackgroundImageFixedHeight()
Gets a float value that indicates the fixed height of the background image.


setBackgroundImageFixedHeight

public void setBackgroundImageFixedHeight(float imageFixedHeight)
Sets a float value that indicates the fixed height of the background image. If this property is not set, the image size will be the image's real size.


setPageSetup

public void setPageSetup(PageSetup pageSetup)
Sets a PageSetup that indicates page info of the section.


getPageSetup

public PageSetup getPageSetup()
Gets a PageSetup that indicates page info of the section.


setTextInfo

public void setTextInfo(TextInfo textInfo)

getTextInfo

public TextInfo getTextInfo()

getParagraphs

public Paragraphs getParagraphs()
Gets a Paragraph collection that indicates all paragraphs in the section.

Returns:
Returns the paragraphs collection.

setParagraphs

public void setParagraphs(Paragraphs paragraphs)
Sets a Paragraph collection that indicates all paragraphs in the section.

Parameters:
paragraphs - The paragraphs to set.

getFirstLineIndent

public int getFirstLineIndent()
Gets an int value that indicates the blank space at the beginning of the section.

Returns:
Returns the m_firstLineIndent.

setFirstLineIndent

public void setFirstLineIndent(int indent)
Sets an int value that indicates the blank space at the beginning of the section.

Parameters:
indent - The indent to set.

isSpaced

public boolean isSpaced()
Gets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown.

 [SampleCode]
 Gets or sets a bool value that indicates whether the spaces at
 the begin of the text and returns in the text be shown. 
 For the following XML: 
       
        The first line,
        The second line.
       
 If IsSpaced is false, the result will be: 
 The first line,The second line.
 If IsSpaced is true, the result will be: 
                                The first line,
                                        The second line.
 


setIsSpaced

public void setIsSpaced(boolean isSpaced)
Sets a bool value that indicates whether the spaces at the begin of the text and returns in the text be shown.


getGraphInfo

public GraphInfo getGraphInfo()
Gets a GraphInfo that indicates graph info of the section.

Returns:
Returns the GraphInfo.

setGraphInfo

public void setGraphInfo(GraphInfo graphInfo)
Sets a GraphInfo that indicates graph info of the section.

Parameters:
graphInfo - The graphInfo to set.

isPageNumberRestarted

public boolean isPageNumberRestarted()
Gets a bool value that indicates whether the page number be restarted at this section.

Returns:
Returns the IsPageNumberRestarted.

isPageNumberRestarted

public void isPageNumberRestarted(boolean pageNumberRestarted)
Sets a bool value that indicates whether the page number be restarted at this section.

Parameters:
pageNumberRestarted - The m_isPageNumberRestarted to set.

isNewColumn

public boolean isNewColumn()
Gets a bool value that indicates whether the section starts at new column.Default is true.
If this property is set to false, please make sure the section has the same column setting as the
former section.

Returns:
Returns the isNewColumn.

isNewColumn

public void isNewColumn(boolean isNewColumn)
Sets a bool value that indicates whether the section starts at new column.Default is true.
If this property is set to false, please make sure the section has the same column setting as the
former section.

Parameters:
isNewColumn - The isNewColumn to set.

getStartingPageNumber

public int getStartingPageNumber()
Gets a int value that indicates the starting page number of the section. Default is 1.

Returns:
Returns the startingPageNumber.

setStartingPageNumber

public void setStartingPageNumber(int startingPageNumber)
Sets a int value that indicates the starting page number of the section. Default is 1.

Parameters:
startingPageNumber - The startingPageNumber to set.

getFirstPageFooter

public HeaderFooter getFirstPageFooter()
Gets a HeaderFooter object that indicates the first page footer of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the first page footer is needed.

Returns:
Returns the FirstPageFooter.

setFirstPageFooter

public void setFirstPageFooter(HeaderFooter firstPageFooter)
Sets a HeaderFooter object that indicates the first page footer of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the first page footer is needed.

Parameters:
firstPageFooter - The FirstPageFooter to set.

getFirstPageHeader

public HeaderFooter getFirstPageHeader()
Gets a HeaderFooter object that indicates the first page header of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the last page header is needed.

Returns:
Returns the FirstPageHeader.

setFirstPageHeader

public void setFirstPageHeader(HeaderFooter firstPageHeader)
Sets a HeaderFooter object that indicates the first page header of the section.
If the first page needs one footer style, the subsequent pages need another footer style,
the last page header is needed.

Parameters:
firstPageHeader - The FirstPageHeader to set.

getLastPageFooter

public HeaderFooter getLastPageFooter()
Gets a HeaderFooter object that indicates the last page footer of the section.
If the last page needs one footer style, the other pages need another footer style,
the last page footer is needed.

Returns:
Returns the LastPageFooter.

setLastPageFooter

public void setLastPageFooter(HeaderFooter lastPageFooter)
Sets a HeaderFooter object that indicates the last page footer of the section.
If the last page needs one footer style, the other pages need another footer style,
the last page footer is needed.

Parameters:
lastPageFooter - The LastPageFooter to set.

getLastPageHeader

public HeaderFooter getLastPageHeader()
Gets a HeaderFooter object that indicates the lasgt page header of the section.
If the last page needs one header style, the other pages need another header style,
the last page header is needed.

Returns:
Returns the LastPageHeader.

setLastPageHeader

public void setLastPageHeader(HeaderFooter lastPageHeader)
Sets a HeaderFooter object that indicates the last page header of the section.
If the last page needs one header style, the other pages need another header style,
the lastpage header is needed.

Parameters:
lastPageHeader - The LastPageHeader to set.

getColumnInfo

public ColumnInfo getColumnInfo()
Gets a ColumnInfo object that indicates the columns info.

Returns:
Returns the ColumnInfo.

setColumnInfo

public void setColumnInfo(ColumnInfo info)
Sets a ColumnInfo object that indicates the columns info.

Parameters:
info - The ColumnInfo to set.

getEvenFooter

public HeaderFooter getEvenFooter()
Gets a HeaderFooter object that indicates the even footer of the section.

Returns:
Returns the EvenFooter.

setEvenFooter

public void setEvenFooter(HeaderFooter footer)
Sets a HeaderFooter object that indicates the even footer of the section.

Parameters:
footer - The EvenFooter to set.

getEvenHeader

public HeaderFooter getEvenHeader()
Gets a HeaderFooter object that indicates the even header of the section.

Returns:
Returns the EvenHeader.

setEvenHeader

public void setEvenHeader(HeaderFooter header)
Sets a HeaderFooter object that indicates the even header of the section.

Parameters:
header - The EvenHeader to set.

isBackgroundImageBlackWhite

public boolean isBackgroundImageBlackWhite()
Gets a bool value that indicates whether the image is forced to be black-and-white.
If black-and-white TIFF image of CCITT subformat is used, this property must be set to true.

Returns:
Returns the IsBackgroundImageBlackWhite.

setIsBackgroundImageBlackWhite

public void setIsBackgroundImageBlackWhite(boolean backgroundImageBlackWhite)
Sets a bool value that indicates whether the image is forced to be black-and-white.
If black-and-white TIFF image of CCITT subformat is used, this property must be set to true.

Parameters:
backgroundImageBlackWhite - The IsBackgroundImageBlackWhite to set.

isDisabled

public boolean isDisabled()
Gets a bool value that indicates whether this section is disabled. The default
value is false. If this property is set to true, this section will not be rendered.

Returns:
Returns the IsDisabled.

setIsDisabled

public void setIsDisabled(boolean disabled)
Sets a bool value that indicates whether this section is disabled. The default
value is false. If this property is set to true, this section will not be rendered.

Parameters:
disabled - The IsDisabled to set.

isLandscape

public boolean isLandscape()
Gets a bool value that indicates whether the page orientation is landscape. The default is false, portrait.

Returns:
Returns the IsLandscape.

setIsLandscape

public void setIsLandscape(boolean landscape)
Sets a bool value that indicates whether the page orientation is landscape. The default is false, portrait.

Parameters:
landscape - The IsLandscape to set.

getOddFooter

public HeaderFooter getOddFooter()
Gets a HeaderFooter object that indicates the odd footer of the section.

Returns:
Returns the OddFooter.

setOddFooter

public void setOddFooter(HeaderFooter oddFooter)
Sets a HeaderFooter object that indicates the odd footer of the section.

Parameters:
oddFooter - The OddFooter to set.

getOddHeader

public HeaderFooter getOddHeader()
Gets a HeaderFooter object that indicates the odd header of the section.

Returns:
Returns the OddHeader.

setOddHeader

public void setOddHeader(HeaderFooter oddHeader)
Sets a HeaderFooter object that indicates the odd header of the section.

Parameters:
oddHeader - The OddHeader to set.

getPageRotatingAngle

public int getPageRotatingAngle()
Gets the number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. Default value is 0.

Returns:
Returns the PageRotatingAngle.

setPageRotatingAngle

public void setPageRotatingAngle(int rotatingAngle)
Sets the number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. Default value is 0.

Parameters:
rotatingAngle - The PageRotatingAngle to set.

getPdf

public Pdf getPdf()
Gets the pdf document.


getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class PdfElementBase
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()