public class ParagraphProperties extends Object
This class is a corresponded high level class for element "style:paragraph-properties". It provides methods to access the attributes and children of "style:paragraph-properties".
| Modifier | Constructor and Description |
|---|---|
protected |
ParagraphProperties()
Create an empty paragraph style setting object
|
protected |
ParagraphProperties(org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement properties)
Create a paragraph style setting object, which has the association with
an element "style:paragraph-properties".
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBackgroundColorAttribute()
Gets backgroundColor represented by the OpenDocument format used data
type See
W3C CSS
specification for further details.
|
String |
getBreakAfter() |
String |
getBreakBefore() |
StyleTypeDefinitions.HorizontalAlignmentType |
getHorizontalAlignment()
Return the horizontal alignment.
|
double |
getMarginBottom()
Get the size of the bottom margin of this
ParagraphProperties |
double |
getMarginLeft()
Get the size of the left margin of this
ParagraphProperties |
double |
getMarginRight()
Get the size of the right margin of this
ParagraphProperties |
double |
getMarginTop()
Get the size of the top margin of this
ParagraphProperties |
static ParagraphProperties |
getOrCreateParagraphProperties(org.odftoolkit.odfdom.dom.element.OdfStyleBase style)
Return an instance of
ParagraphProperties to represent the
"style:paragraph-properties" in a style element. |
int |
getPageNumber() |
static ParagraphProperties |
getParagraphProperties(org.odftoolkit.odfdom.dom.element.OdfStyleBase style)
Return an instance of
ParagraphProperties to represent the
"style:paragraph-properties" in a style element. |
double |
getTextIndent()
Get the size of the text indention of this
ParagraphProperties |
void |
setBackgroundColor(org.odftoolkit.odfdom.type.Color bkColor)
Sets backgroundColor represented by the OpenDocument format used data
type See
W3C CSS
specification for further details.
|
void |
setBreak(String breakPosition,
String breakAttribute) |
void |
setHorizontalAlignment(StyleTypeDefinitions.HorizontalAlignmentType alignType)
Set the horizontal alignment.
|
void |
setMarginBottom(double marginBottom)
Set the bottom margin of this
ParagraphProperties |
void |
setMarginLeft(double marginLeft)
Set the left margin of this
ParagraphProperties |
void |
setMarginRight(double marginRight)
Set the right margin of this
ParagraphProperties |
void |
setMarginTop(double marginTop)
Set the top margin of this
ParagraphProperties |
void |
setPageNumber(int pageNumber) |
void |
setTextIndent(double textIndent)
Set the text indention size of this
ParagraphProperties |
protected ParagraphProperties()
protected ParagraphProperties(org.odftoolkit.odfdom.dom.element.style.StyleParagraphPropertiesElement properties)
properties - - the element "style:paragraph-properties"public void setHorizontalAlignment(StyleTypeDefinitions.HorizontalAlignmentType alignType)
If the first parameter is null, the horizontal alignment setting will be removed.
alignType - - the horizontal alignmentpublic StyleTypeDefinitions.HorizontalAlignmentType getHorizontalAlignment()
Null will be returned if there is no horizontal alignment setting.
public void setMarginLeft(double marginLeft)
ParagraphPropertiesmarginLeft - the size of the left margin (in Millimeter)public double getMarginLeft()
ParagraphPropertiespublic void setMarginRight(double marginRight)
ParagraphPropertiesmarginRight - the size of the right margin (in Millimeter)public double getMarginRight()
ParagraphPropertiespublic void setMarginTop(double marginTop)
ParagraphPropertiesmarginTop - the size of the right margin (in Millimeter)public double getMarginTop()
ParagraphPropertiespublic void setMarginBottom(double marginBottom)
ParagraphPropertiesmarginBottom - the size of the bottom margin (in Millimeter)public double getMarginBottom()
ParagraphPropertiespublic void setTextIndent(double textIndent)
ParagraphPropertiestextIndent - the size of the text indention (in Millimeter)public double getTextIndent()
ParagraphPropertiespublic static ParagraphProperties getOrCreateParagraphProperties(org.odftoolkit.odfdom.dom.element.OdfStyleBase style)
ParagraphProperties to represent the
"style:paragraph-properties" in a style element.
If there is no "style:paragraph-properties" defined in the style element,
a new "style:paragraph-properties" element will be created.
style - - a style elementParagraphPropertiespublic static ParagraphProperties getParagraphProperties(org.odftoolkit.odfdom.dom.element.OdfStyleBase style)
ParagraphProperties to represent the
"style:paragraph-properties" in a style element.
If there is no "style:paragraph-properties" defined in the style element,
null will be returned.
style - - a style elementParagraphProperties;Null if there is no
"style:paragraph-properties" definedpublic String getBreakBefore()
public String getBreakAfter()
public int getPageNumber()
public void setPageNumber(int pageNumber)
public void setBackgroundColor(org.odftoolkit.odfdom.type.Color bkColor)
bkColor - public String getBackgroundColorAttribute()
Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2019 The Document Foundation. All rights reserved.