|
com.aspose.pdf.elements
Class Paragraph
java.lang.Object
com.aspose.pdf.elements.PdfElementBase
com.aspose.pdf.elements.Paragraph
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- Attachment, Graph, Image, List, Table, Text
public abstract class Paragraph - extends PdfElementBase
Represents a paragraph object.
|
Method Summary |
java.lang.Object |
clone()
Clone an object. |
org.w3c.dom.Element |
getDOMElement()
Gets a DOM representation of the pdf element. |
float |
getLeft()
Gets a float value that indicates the left position of the paragraph. |
MarginInfo |
getMargin()
Gets MarginInfo object that indicates the margin info of the paragraph. |
float |
getTop()
Gets a float value that indicates the top position of the paragraph. |
boolean |
isDisabled()
Gets a bool value that indicates whether this paragraph is disabled.
The default value is false. |
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.
The default value is false. |
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 |
setLeft(float left)
Sets a float value that indicates the left position of the paragraph. |
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. |
void |
setTop(float top)
Sets a float value that indicates the top position of the paragraph. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Paragraph
public Paragraph(ElementFactory elementFactory)
- Initializes a new instance of the Paragraph class.
- Parameters:
elementFactory - xsl-fo DOM element factory.
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()
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.
- Parameters:
marginInfo - The MarginInfo to set.
getMargin
public MarginInfo getMargin()
- Gets MarginInfo object that indicates the margin info of the paragraph.
- Returns:
- Returns the MarginInfo.
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".
getLeft
public float getLeft()
- Gets a float value that indicates the left position of the paragraph. The unit is point.
- Returns:
- Returns the Left.
setLeft
public void setLeft(float left)
- Sets a float value that indicates the left position of the paragraph. The unit is point.
- Parameters:
left - The Left to set.
getTop
public float getTop()
- Gets a float value that indicates the top position of the paragraph. The unit is point.
setTop
public void setTop(float top)
- Sets a float value that indicates the top position of the paragraph. The unit is point.
- Parameters:
top - The Top to set.
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()
|