Class ParagraphProperties
java.lang.Object
com.independentsoft.office.odf.styles.ParagraphProperties
Represents formatting properties for paragraphs.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the ParagraphProperties class. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the background color of the page layout.Gets the background image.Gets the border of the paragraph.Gets the widths of borders defined by the FO border properties for borders where the value of these properties is double.Gets the bottom border of the paragraph.Gets the widths of the bottom border for borders defined by the FO border properties if the property for the bottom border has the value double.Gets the bottom margin of the page layout.Gets the bottom padding of the page layout.Gets the break after paragraph.Gets the break before paragraph.Gets the fixed line height.Gets the keep together.Gets the keep with next.Gets the left border of the paragraph.Gets the widths of the left border for borders defined by the FO border properties if the property for the left border has the value double.Gets the left margin of the page layout.Gets the left padding of the page layout.Specifies whether word wrapping is allowed for axis labels.Gets the fixed distance between two lines.intGets the new start value for line numbering.Gets the margin of the page layout.Gets the minimum line height.intGets the orphans.Gets the padding of the page layout.Gets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.Specifies whether a punctuation mark, if one is present, can be hanging, that is, whether it can placed in the margin area at the end of a full line of text.Gets the right border of the paragraph.Gets the widths of the right border for borders defined by the FO border properties if the property for the right border has the value double.Gets the right margin of the page layout.Gets the right padding of the page layout.Gets the shadow effect.Gets the distance between default tab stops.Gets the distance between default tab stops.Gets the alignment of paragraphs in a text.Gets the text last line alignment.Specifies whether to add space between portions of Asian, Western, and complex texts.Gets the indent for the text lines of a list item.Gets the top border of the paragraph.Gets the widths of the top border for borders defined by the FO border properties if the property for the top border has the value double.Gets the top margin of the page layout.Gets the top padding of the page layout.intGets the minimum number of lines that shall be displayed at the top of a page to avoid paragraph widows.Gets the writing mode of the paragraph.booleanSpecifies that the first line of a paragraph is indented by a value that is based on the current font size.booleanSpecifies whether a consumer may recalculate the writing mode of a paragraph based on its content whenever the content is edited.booleanSpecifies whether lines are numbered.booleanSpecifies whether a single word should be justified when the last line in a paragraph is justified.booleanSpecifies whether the lines on both sides of a printed page align.booleanSpecifies whether the layout of a paragraph should consider the layout grid settings of the page where it appears.voidsetAutoTextIndent(boolean autoTextIndent)Specifies that the first line of a paragraph is indented by a value that is based on the current font size.voidsetAutoWritingMode(boolean autoWritingMode)Specifies whether a consumer may recalculate the writing mode of a paragraph based on its content whenever the content is edited.voidsetBackgroundColor(String backgroundColor)Sets the background color of the page layout.voidsetBackgroundImage(BackgroundImage backgroundImage)Sets an image as a background.voidSets the border of the paragraph.voidsetBorderLineWidth(BorderLineWidth borderLineWidth)Sets the widths of borders defined by the FO border properties for borders where the value of these properties is double.voidsetBottomBorder(Border bottomBorder)Sets the bottom border of the paragraph.voidsetBottomBorderLineWidth(BorderLineWidth bottomBorderLineWidth)Sets the widths of the bottom border for borders defined by the FO border properties if the property for the bottom border has the value double.voidsetBottomMargin(Size bottomMargin)Sets the bottom margin of the page layout.voidsetBottomPadding(Size bottomPadding)Sets the bottom padding of the page layout.voidsetBreakAfter(Break breakAfter)Sets the break after paragraph.voidsetBreakBefore(Break breakBefore)Sets the break before paragraph.voidsetEnableLineNumbering(boolean enableLineNumbering)Specifies whether lines are numbered.voidsetFixedLineHeight(String fixedLineHeight)Sets the fixed line height.voidsetFontIndependentLineSpacing(boolean useFontIndependentLineSpacing)Specifies if font independent line spacing is used.voidsetJustifySingleWord(boolean justifySingleWord)Specifies whether a single word should be justified when the last line in a paragraph is justified.voidsetKeepTogether(KeepTogether keepTogether)Sets the keep together.voidsetKeepWithNext(KeepTogether keepWithNext)Sets the keep with next.voidsetLeftBorder(Border leftBorder)Sets the left border of the paragraph.voidsetLeftBorderLineWidth(BorderLineWidth leftBorderLineWidth)Sets the widths of the left border for borders defined by the FO border properties if the property for the left border has the value double.voidsetLeftMargin(Size leftMargin)Sets the left margin of the page layout.voidsetLeftPadding(Size leftPadding)Sets the left padding of the page layout.voidsetLineBreak(LineBreakType lineBreak)Specifies whether word wrapping is allowed for axis labels.voidsetLineDistance(Size lineDistance)Sets the fixed distance between two lines.voidsetLineNumberStartValue(int lineNumberStartValue)Sets the new start value for line numbering.voidSets the margin of the page layout.voidsetMinimumLineHeight(Size minimumLineHeight)Sets the minimum line height.voidsetOrphans(int orphans)Sets the orphans.voidsetPadding(Size padding)Sets the padding of the page layout.voidsetPageNumber(String pageNumber)Sets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.voidsetPunctuationWrap(PunctuationWrap punctuationWrap)Specifies whether a punctuation mark, if one is present, can be hanging, that is, whether it can placed in the margin area at the end of a full line of text.voidsetRegisterTrue(boolean registerTrue)Specifies whether the lines on both sides of a printed page align.voidsetRightBorder(Border rightBorder)Sets the right border of the paragraph.voidsetRightBorderLineWidth(BorderLineWidth rightBorderLineWidth)Sets the widths of the right border for borders defined by the FO border properties if the property for the right border has the value double.voidsetRightMargin(Size rightMargin)Sets the right margin of the page layout.voidsetRightPadding(Size rightPadding)Sets the right padding of the page layout.voidSets the shadow effect.voidsetSnapToLayoutGrid(boolean snapToLayoutGrid)Specifies whether the layout of a paragraph should consider the layout grid settings of the page where it appears.voidsetTabStopDistance(Size tabStopDistance)Sets the distance between default tab stops.voidsetTextAlignment(TextAlignment textAlignment)Sets the alignment of paragraphs in a text.voidsetTextAlignmentLastLine(TextAlignmentLastLine textAlignmentLastLine)Sets the text last line alignment.voidsetTextAutospace(TextAutospace textAutospace)Specifies whether to add space between portions of Asian, Western, and complex texts.voidsetTextIndent(Size textIndent)Sets the indent for the text lines of a list item.voidsetTopBorder(Border topBorder)Sets the top border of the paragraph.voidsetTopBorderLineWidth(BorderLineWidth topBorderLineWidth)Sets the widths of the top border for borders defined by the FO border properties if the property for the top border has the value double.voidsetTopMargin(Size topMargin)Sets the top margin of the page layout.voidsetTopPadding(Size topPadding)Sets the top padding of the page layout.voidsetWidows(int widows)Sets the minimum number of lines that shall be displayed at the top of a page to avoid paragraph widows.voidsetWritingMode(WritingMode writingMode)Sets the writing mode of the paragraph.toString()Converts the value of the current ParagraphProperties object to its equivalent string representation.booleanSpecifies if font independent line spacing is used.
-
Constructor Details
-
ParagraphProperties
public ParagraphProperties()Initializes a new instance of the ParagraphProperties class.
-
-
Method Details
-
clone
Creates a new object that is a deep copy of the current instance. -
toString
Converts the value of the current ParagraphProperties object to its equivalent string representation. -
getTextAlignment
Gets the alignment of paragraphs in a text.- Returns:
- the text alignment
-
setTextAlignment
Sets the alignment of paragraphs in a text.- Parameters:
textAlignment- the new text alignment
-
getFixedLineHeight
Gets the fixed line height.- Returns:
- the fixed line height
-
setFixedLineHeight
Sets the fixed line height.- Parameters:
fixedLineHeight- the new fixed line height
-
getMinimumLineHeight
Gets the minimum line height.- Returns:
- the minimum line height
-
setMinimumLineHeight
Sets the minimum line height.- Parameters:
minimumLineHeight- the new minimum line height
-
getLineDistance
Gets the fixed distance between two lines.- Returns:
- the line distance
-
setLineDistance
Sets the fixed distance between two lines.- Parameters:
lineDistance- the new line distance
-
getTabStops
Gets the distance between default tab stops.- Returns:
- the tab stops
-
getBorder
Gets the border of the paragraph.- Returns:
- the border
-
setBorder
Sets the border of the paragraph.- Parameters:
border- the new border
-
getLeftBorder
Gets the left border of the paragraph.- Returns:
- the left border
-
setLeftBorder
Sets the left border of the paragraph.- Parameters:
leftBorder- the new left border
-
getRightBorder
Gets the right border of the paragraph.- Returns:
- the right border
-
setRightBorder
Sets the right border of the paragraph.- Parameters:
rightBorder- the new right border
-
getTopBorder
Gets the top border of the paragraph.- Returns:
- the top border
-
setTopBorder
Sets the top border of the paragraph.- Parameters:
topBorder- the new top border
-
getBottomBorder
Gets the bottom border of the paragraph.- Returns:
- the bottom border
-
setBottomBorder
Sets the bottom border of the paragraph.- Parameters:
bottomBorder- the new bottom border
-
getBorderLineWidth
Gets the widths of borders defined by the FO border properties for borders where the value of these properties is double.- Returns:
- the border line width
-
setBorderLineWidth
Sets the widths of borders defined by the FO border properties for borders where the value of these properties is double.- Parameters:
borderLineWidth- the new border line width
-
getLeftBorderLineWidth
Gets the widths of the left border for borders defined by the FO border properties if the property for the left border has the value double.- Returns:
- the left border line width
-
setLeftBorderLineWidth
Sets the widths of the left border for borders defined by the FO border properties if the property for the left border has the value double.- Parameters:
leftBorderLineWidth- the new left border line width
-
getRightBorderLineWidth
Gets the widths of the right border for borders defined by the FO border properties if the property for the right border has the value double.- Returns:
- the right border line width
-
setRightBorderLineWidth
Sets the widths of the right border for borders defined by the FO border properties if the property for the right border has the value double.- Parameters:
rightBorderLineWidth- the new right border line width
-
getTopBorderLineWidth
Gets the widths of the top border for borders defined by the FO border properties if the property for the top border has the value double.- Returns:
- the top border line width
-
setTopBorderLineWidth
Sets the widths of the top border for borders defined by the FO border properties if the property for the top border has the value double.- Parameters:
topBorderLineWidth- the new top border line width
-
getBottomBorderLineWidth
Gets the widths of the bottom border for borders defined by the FO border properties if the property for the bottom border has the value double.- Returns:
- the bottom border line width
-
setBottomBorderLineWidth
Sets the widths of the bottom border for borders defined by the FO border properties if the property for the bottom border has the value double.- Parameters:
bottomBorderLineWidth- the new bottom border line width
-
getPadding
Gets the padding of the page layout.- Returns:
- the padding
-
setPadding
Sets the padding of the page layout.- Parameters:
padding- the new padding
-
getLeftPadding
Gets the left padding of the page layout.- Returns:
- the left padding
-
setLeftPadding
Sets the left padding of the page layout.- Parameters:
leftPadding- the new left padding
-
getRightPadding
Gets the right padding of the page layout.- Returns:
- the right padding
-
setRightPadding
Sets the right padding of the page layout.- Parameters:
rightPadding- the new right padding
-
getTopPadding
Gets the top padding of the page layout.- Returns:
- the top padding
-
setTopPadding
Sets the top padding of the page layout.- Parameters:
topPadding- the new top padding
-
getBottomPadding
Gets the bottom padding of the page layout.- Returns:
- the bottom padding
-
setBottomPadding
Sets the bottom padding of the page layout.- Parameters:
bottomPadding- the new bottom padding
-
getMargin
Gets the margin of the page layout.- Returns:
- the margin
-
setMargin
Sets the margin of the page layout.- Parameters:
margin- the new margin
-
getLeftMargin
Gets the left margin of the page layout.- Returns:
- the left margin
-
setLeftMargin
Sets the left margin of the page layout.- Parameters:
leftMargin- the new left margin
-
getRightMargin
Gets the right margin of the page layout.- Returns:
- the right margin
-
setRightMargin
Sets the right margin of the page layout.- Parameters:
rightMargin- the new right margin
-
getTopMargin
Gets the top margin of the page layout.- Returns:
- the top margin
-
setTopMargin
Sets the top margin of the page layout.- Parameters:
topMargin- the new top margin
-
getBottomMargin
Gets the bottom margin of the page layout.- Returns:
- the bottom margin
-
setBottomMargin
Sets the bottom margin of the page layout.- Parameters:
bottomMargin- the new bottom margin
-
getBackgroundColor
Gets the background color of the page layout.- Returns:
- the background color
-
setBackgroundColor
Sets the background color of the page layout.- Parameters:
backgroundColor- the new background color
-
getBreakBefore
Gets the break before paragraph.- Returns:
- the break before
-
setBreakBefore
Sets the break before paragraph.- Parameters:
breakBefore- the new break before
-
getBreakAfter
Gets the break after paragraph.- Returns:
- the break after
-
setBreakAfter
Sets the break after paragraph.- Parameters:
breakAfter- the new break after
-
isEnableLineNumbering
public boolean isEnableLineNumbering()Specifies whether lines are numbered.- Returns:
- true, if is enable line numbering
-
setEnableLineNumbering
public void setEnableLineNumbering(boolean enableLineNumbering)Specifies whether lines are numbered.- Parameters:
enableLineNumbering- the new enable line numbering
-
getLineNumberStartValue
public int getLineNumberStartValue()Gets the new start value for line numbering.- Returns:
- the line number start value
-
setLineNumberStartValue
public void setLineNumberStartValue(int lineNumberStartValue)Sets the new start value for line numbering.- Parameters:
lineNumberStartValue- the new line number start value
-
getWritingMode
Gets the writing mode of the paragraph.- Returns:
- the writing mode
-
setWritingMode
Sets the writing mode of the paragraph.- Parameters:
writingMode- the new writing mode
-
getKeepTogether
Gets the keep together.- Returns:
- the keep together
-
setKeepTogether
Sets the keep together.- Parameters:
keepTogether- the new keep together
-
getKeepWithNext
Gets the keep with next.- Returns:
- the keep with next
-
setKeepWithNext
Sets the keep with next.- Parameters:
keepWithNext- the new keep with next
-
getShadow
Gets the shadow effect.- Returns:
- the shadow
-
setShadow
Sets the shadow effect.- Parameters:
shadow- the new shadow
-
useFontIndependentLineSpacing
public boolean useFontIndependentLineSpacing()Specifies if font independent line spacing is used.- Returns:
- true, if successful
-
setFontIndependentLineSpacing
public void setFontIndependentLineSpacing(boolean useFontIndependentLineSpacing)Specifies if font independent line spacing is used.- Parameters:
useFontIndependentLineSpacing- the new font independent line spacing
-
getTextAlignmentLastLine
Gets the text last line alignment.- Returns:
- the text alignment last line
-
setTextAlignmentLastLine
Sets the text last line alignment.- Parameters:
textAlignmentLastLine- the new text alignment last line
-
isJustifySingleWord
public boolean isJustifySingleWord()Specifies whether a single word should be justified when the last line in a paragraph is justified.- Returns:
- true, if is justify single word
-
setJustifySingleWord
public void setJustifySingleWord(boolean justifySingleWord)Specifies whether a single word should be justified when the last line in a paragraph is justified.- Parameters:
justifySingleWord- the new justify single word
-
getWidows
public int getWidows()Gets the minimum number of lines that shall be displayed at the top of a page to avoid paragraph widows.- Returns:
- the widows
-
setWidows
public void setWidows(int widows)Sets the minimum number of lines that shall be displayed at the top of a page to avoid paragraph widows.- Parameters:
widows- the new widows
-
getOrphans
public int getOrphans()Gets the orphans.- Returns:
- the orphans
-
setOrphans
public void setOrphans(int orphans)Sets the orphans.- Parameters:
orphans- the new orphans
-
getTabStopDistance
Gets the distance between default tab stops.- Returns:
- the tab stop distance
-
setTabStopDistance
Sets the distance between default tab stops.- Parameters:
tabStopDistance- the new tab stop distance
-
isRegisterTrue
public boolean isRegisterTrue()Specifies whether the lines on both sides of a printed page align. The text baselines of text in page columns or text box columns also align.- Returns:
- true, if is register true
-
setRegisterTrue
public void setRegisterTrue(boolean registerTrue)Specifies whether the lines on both sides of a printed page align. The text baselines of text in page columns or text box columns also align.- Parameters:
registerTrue- the new register true
-
getTextIndent
Gets the indent for the text lines of a list item.- Returns:
- the text indent
-
setTextIndent
Sets the indent for the text lines of a list item.- Parameters:
textIndent- the new text indent
-
isAutoTextIndent
public boolean isAutoTextIndent()Specifies that the first line of a paragraph is indented by a value that is based on the current font size.- Returns:
- true, if is auto text indent
-
setAutoTextIndent
public void setAutoTextIndent(boolean autoTextIndent)Specifies that the first line of a paragraph is indented by a value that is based on the current font size.- Parameters:
autoTextIndent- the new auto text indent
-
getTextAutospace
Specifies whether to add space between portions of Asian, Western, and complex texts.- Returns:
- the text autospace
-
setTextAutospace
Specifies whether to add space between portions of Asian, Western, and complex texts.- Parameters:
textAutospace- the new text autospace
-
getPunctuationWrap
Specifies whether a punctuation mark, if one is present, can be hanging, that is, whether it can placed in the margin area at the end of a full line of text.- Returns:
- the punctuation wrap
-
setPunctuationWrap
Specifies whether a punctuation mark, if one is present, can be hanging, that is, whether it can placed in the margin area at the end of a full line of text.- Parameters:
punctuationWrap- the new punctuation wrap
-
getLineBreak
Specifies whether word wrapping is allowed for axis labels.- Returns:
- the line break
-
setLineBreak
Specifies whether word wrapping is allowed for axis labels.- Parameters:
lineBreak- the new line break
-
isAutoWritingMode
public boolean isAutoWritingMode()Specifies whether a consumer may recalculate the writing mode of a paragraph based on its content whenever the content is edited.- Returns:
- true, if is auto writing mode
-
setAutoWritingMode
public void setAutoWritingMode(boolean autoWritingMode)Specifies whether a consumer may recalculate the writing mode of a paragraph based on its content whenever the content is edited.- Parameters:
autoWritingMode- the new auto writing mode
-
isSnapToLayoutGrid
public boolean isSnapToLayoutGrid()Specifies whether the layout of a paragraph should consider the layout grid settings of the page where it appears.- Returns:
- true, if is snap to layout grid
-
setSnapToLayoutGrid
public void setSnapToLayoutGrid(boolean snapToLayoutGrid)Specifies whether the layout of a paragraph should consider the layout grid settings of the page where it appears.- Parameters:
snapToLayoutGrid- the new snap to layout grid
-
getPageNumber
Gets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.- Returns:
- the page number
-
setPageNumber
Sets the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.- Parameters:
pageNumber- the new page number
-
getBackgroundImage
Gets the background image.- Returns:
- the background image
-
setBackgroundImage
Sets an image as a background.- Parameters:
backgroundImage- the new background image
-