Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class Paragraph

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.Paragraph
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Image, Table, Text

public abstract class Paragraph
extends PdfElementBase

Represents a paragraph object.


Constructor Summary
Paragraph(ElementFactory elementFactory)
          Initializes a new instance of the Paragraph class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 MarginInfo getMargin()
          Gets MarginInfo object that indicates the margin info of the paragraph.
 boolean isDisabled()
          Gets a bool value that indicates whether this paragraph is disabled.
 boolean isFirstParagraph()
          Gets a bool value that indicates whether the paragraph is the
first paragraph of a page.
 boolean isKeptTogether()
          Gets a bool value that indicates whether all lines in the
paragraph are to remain on the same page.
 boolean isOnOddPage()
          Gets a bool value that indicates whether this paragraph be shown in odd page only.
 void setDisabled(boolean disabled)
          Sets a bool value that indicates whether this paragraph is disabled.
 void setFirstParagraph(boolean isFirstParagraph)
          Sets a bool value that indicates whether the paragraph is the
first paragraph of a page.
 void setKeptTogether(boolean keepTogether)
          Sets a bool value that indicates whether all lines in the
paragraph are to remain on the same page.
 void setMargin(MarginInfo marginInfo)
          Sets MarginInfo object that indicates the margin info of the paragraph.
 void setOnOddPage(boolean onOddPage)
          Sets a bool value that indicates whether this paragraph be shown in odd page only.
 
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

Paragraph

public Paragraph(ElementFactory elementFactory)
Initializes a new instance of the Paragraph class.

Parameters:
elementFactory - xsl-fo DOM element factory.
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:
java.lang.Object#clone()

isDisabled

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


setDisabled

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


isFirstParagraph

public boolean isFirstParagraph()
Gets a bool value that indicates whether the paragraph is the
first paragraph of a page. If this property is set to true,
Aspose.Pdf will start a new page for this paragraph.


setFirstParagraph

public void setFirstParagraph(boolean isFirstParagraph)
Sets a bool value that indicates whether the paragraph is the
first paragraph of a page. If this property is set to true,
Aspose.Pdf will start a new page for this paragraph.


setMargin

public void setMargin(MarginInfo marginInfo)
Sets MarginInfo object that indicates the margin info of the paragraph.


getMargin

public MarginInfo getMargin()
Gets MarginInfo object that indicates the margin info of the paragraph.

Returns:
Returns the MarginInfo.

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()

isKeptTogether

public boolean isKeptTogether()
Gets a bool value that indicates whether all lines in the
paragraph are to remain on the same page. Default is false.


setKeptTogether

public void setKeptTogether(boolean keepTogether)
Sets a bool value that indicates whether all lines in the
paragraph are to remain on the same page. Default is false.


isOnOddPage

public boolean isOnOddPage()
Gets a bool value that indicates whether this paragraph be shown in odd page only. This property used for duplex Printing. If you want to print a paragraph in a new odd page in duplex Printing, you can set "IsOnOddPage = true".


setOnOddPage

public void setOnOddPage(boolean onOddPage)
Sets a bool value that indicates whether this paragraph be shown in odd page only. This property used for duplex Printing. If you want to print a paragraph in a new odd page in duplex Printing, you can set "IsOnOddPage = true".