Class ParagraphProperties

java.lang.Object
com.independentsoft.office.odf.styles.ParagraphProperties

public class ParagraphProperties extends Object
Represents formatting properties for paragraphs.
  • Constructor Details

    • ParagraphProperties

      public ParagraphProperties()
      Initializes a new instance of the ParagraphProperties class.
  • Method Details

    • clone

      public ParagraphProperties clone()
      Creates a new object that is a deep copy of the current instance.
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current ParagraphProperties object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getTextAlignment

      public TextAlignment getTextAlignment()
      Gets the alignment of paragraphs in a text.
      Returns:
      the text alignment
    • setTextAlignment

      public void setTextAlignment(TextAlignment textAlignment)
      Sets the alignment of paragraphs in a text.
      Parameters:
      textAlignment - the new text alignment
    • getFixedLineHeight

      public String getFixedLineHeight()
      Gets the fixed line height.
      Returns:
      the fixed line height
    • setFixedLineHeight

      public void setFixedLineHeight(String fixedLineHeight)
      Sets the fixed line height.
      Parameters:
      fixedLineHeight - the new fixed line height
    • getMinimumLineHeight

      public Size getMinimumLineHeight()
      Gets the minimum line height.
      Returns:
      the minimum line height
    • setMinimumLineHeight

      public void setMinimumLineHeight(Size minimumLineHeight)
      Sets the minimum line height.
      Parameters:
      minimumLineHeight - the new minimum line height
    • getLineDistance

      public Size getLineDistance()
      Gets the fixed distance between two lines.
      Returns:
      the line distance
    • setLineDistance

      public void setLineDistance(Size lineDistance)
      Sets the fixed distance between two lines.
      Parameters:
      lineDistance - the new line distance
    • getTabStops

      public List<TabStop> getTabStops()
      Gets the distance between default tab stops.
      Returns:
      the tab stops
    • getBorder

      public Border getBorder()
      Gets the border of the paragraph.
      Returns:
      the border
    • setBorder

      public void setBorder(Border border)
      Sets the border of the paragraph.
      Parameters:
      border - the new border
    • getLeftBorder

      public Border getLeftBorder()
      Gets the left border of the paragraph.
      Returns:
      the left border
    • setLeftBorder

      public void setLeftBorder(Border leftBorder)
      Sets the left border of the paragraph.
      Parameters:
      leftBorder - the new left border
    • getRightBorder

      public Border getRightBorder()
      Gets the right border of the paragraph.
      Returns:
      the right border
    • setRightBorder

      public void setRightBorder(Border rightBorder)
      Sets the right border of the paragraph.
      Parameters:
      rightBorder - the new right border
    • getTopBorder

      public Border getTopBorder()
      Gets the top border of the paragraph.
      Returns:
      the top border
    • setTopBorder

      public void setTopBorder(Border topBorder)
      Sets the top border of the paragraph.
      Parameters:
      topBorder - the new top border
    • getBottomBorder

      public Border getBottomBorder()
      Gets the bottom border of the paragraph.
      Returns:
      the bottom border
    • setBottomBorder

      public void setBottomBorder(Border bottomBorder)
      Sets the bottom border of the paragraph.
      Parameters:
      bottomBorder - the new bottom border
    • getBorderLineWidth

      public BorderLineWidth 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

      public void setBorderLineWidth(BorderLineWidth borderLineWidth)
      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

      public BorderLineWidth 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

      public void setLeftBorderLineWidth(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.
      Parameters:
      leftBorderLineWidth - the new left border line width
    • getRightBorderLineWidth

      public BorderLineWidth 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

      public void setRightBorderLineWidth(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.
      Parameters:
      rightBorderLineWidth - the new right border line width
    • getTopBorderLineWidth

      public BorderLineWidth 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

      public void setTopBorderLineWidth(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.
      Parameters:
      topBorderLineWidth - the new top border line width
    • getBottomBorderLineWidth

      public BorderLineWidth 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

      public void setBottomBorderLineWidth(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.
      Parameters:
      bottomBorderLineWidth - the new bottom border line width
    • getPadding

      public Size getPadding()
      Gets the padding of the page layout.
      Returns:
      the padding
    • setPadding

      public void setPadding(Size padding)
      Sets the padding of the page layout.
      Parameters:
      padding - the new padding
    • getLeftPadding

      public Size getLeftPadding()
      Gets the left padding of the page layout.
      Returns:
      the left padding
    • setLeftPadding

      public void setLeftPadding(Size leftPadding)
      Sets the left padding of the page layout.
      Parameters:
      leftPadding - the new left padding
    • getRightPadding

      public Size getRightPadding()
      Gets the right padding of the page layout.
      Returns:
      the right padding
    • setRightPadding

      public void setRightPadding(Size rightPadding)
      Sets the right padding of the page layout.
      Parameters:
      rightPadding - the new right padding
    • getTopPadding

      public Size getTopPadding()
      Gets the top padding of the page layout.
      Returns:
      the top padding
    • setTopPadding

      public void setTopPadding(Size topPadding)
      Sets the top padding of the page layout.
      Parameters:
      topPadding - the new top padding
    • getBottomPadding

      public Size getBottomPadding()
      Gets the bottom padding of the page layout.
      Returns:
      the bottom padding
    • setBottomPadding

      public void setBottomPadding(Size bottomPadding)
      Sets the bottom padding of the page layout.
      Parameters:
      bottomPadding - the new bottom padding
    • getMargin

      public Size getMargin()
      Gets the margin of the page layout.
      Returns:
      the margin
    • setMargin

      public void setMargin(Size margin)
      Sets the margin of the page layout.
      Parameters:
      margin - the new margin
    • getLeftMargin

      public Size getLeftMargin()
      Gets the left margin of the page layout.
      Returns:
      the left margin
    • setLeftMargin

      public void setLeftMargin(Size leftMargin)
      Sets the left margin of the page layout.
      Parameters:
      leftMargin - the new left margin
    • getRightMargin

      public Size getRightMargin()
      Gets the right margin of the page layout.
      Returns:
      the right margin
    • setRightMargin

      public void setRightMargin(Size rightMargin)
      Sets the right margin of the page layout.
      Parameters:
      rightMargin - the new right margin
    • getTopMargin

      public Size getTopMargin()
      Gets the top margin of the page layout.
      Returns:
      the top margin
    • setTopMargin

      public void setTopMargin(Size topMargin)
      Sets the top margin of the page layout.
      Parameters:
      topMargin - the new top margin
    • getBottomMargin

      public Size getBottomMargin()
      Gets the bottom margin of the page layout.
      Returns:
      the bottom margin
    • setBottomMargin

      public void setBottomMargin(Size bottomMargin)
      Sets the bottom margin of the page layout.
      Parameters:
      bottomMargin - the new bottom margin
    • getBackgroundColor

      public String getBackgroundColor()
      Gets the background color of the page layout.
      Returns:
      the background color
    • setBackgroundColor

      public void setBackgroundColor(String backgroundColor)
      Sets the background color of the page layout.
      Parameters:
      backgroundColor - the new background color
    • getBreakBefore

      public Break getBreakBefore()
      Gets the break before paragraph.
      Returns:
      the break before
    • setBreakBefore

      public void setBreakBefore(Break breakBefore)
      Sets the break before paragraph.
      Parameters:
      breakBefore - the new break before
    • getBreakAfter

      public Break getBreakAfter()
      Gets the break after paragraph.
      Returns:
      the break after
    • setBreakAfter

      public void setBreakAfter(Break breakAfter)
      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

      public WritingMode getWritingMode()
      Gets the writing mode of the paragraph.
      Returns:
      the writing mode
    • setWritingMode

      public void setWritingMode(WritingMode writingMode)
      Sets the writing mode of the paragraph.
      Parameters:
      writingMode - the new writing mode
    • getKeepTogether

      public KeepTogether getKeepTogether()
      Gets the keep together.
      Returns:
      the keep together
    • setKeepTogether

      public void setKeepTogether(KeepTogether keepTogether)
      Sets the keep together.
      Parameters:
      keepTogether - the new keep together
    • getKeepWithNext

      public KeepTogether getKeepWithNext()
      Gets the keep with next.
      Returns:
      the keep with next
    • setKeepWithNext

      public void setKeepWithNext(KeepTogether keepWithNext)
      Sets the keep with next.
      Parameters:
      keepWithNext - the new keep with next
    • getShadow

      public String getShadow()
      Gets the shadow effect.
      Returns:
      the shadow
    • setShadow

      public void setShadow(String shadow)
      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

      public TextAlignmentLastLine getTextAlignmentLastLine()
      Gets the text last line alignment.
      Returns:
      the text alignment last line
    • setTextAlignmentLastLine

      public void setTextAlignmentLastLine(TextAlignmentLastLine textAlignmentLastLine)
      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

      public Size getTabStopDistance()
      Gets the distance between default tab stops.
      Returns:
      the tab stop distance
    • setTabStopDistance

      public void setTabStopDistance(Size tabStopDistance)
      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

      public Size getTextIndent()
      Gets the indent for the text lines of a list item.
      Returns:
      the text indent
    • setTextIndent

      public void setTextIndent(Size textIndent)
      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

      public TextAutospace getTextAutospace()
      Specifies whether to add space between portions of Asian, Western, and complex texts.
      Returns:
      the text autospace
    • setTextAutospace

      public void setTextAutospace(TextAutospace textAutospace)
      Specifies whether to add space between portions of Asian, Western, and complex texts.
      Parameters:
      textAutospace - the new text autospace
    • getPunctuationWrap

      public PunctuationWrap 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

      public void setPunctuationWrap(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.
      Parameters:
      punctuationWrap - the new punctuation wrap
    • getLineBreak

      public LineBreakType getLineBreak()
      Specifies whether word wrapping is allowed for axis labels.
      Returns:
      the line break
    • setLineBreak

      public void setLineBreak(LineBreakType lineBreak)
      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

      public String 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

      public void setPageNumber(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.
      Parameters:
      pageNumber - the new page number
    • getBackgroundImage

      public BackgroundImage getBackgroundImage()
      Gets the background image.
      Returns:
      the background image
    • setBackgroundImage

      public void setBackgroundImage(BackgroundImage backgroundImage)
      Sets an image as a background.
      Parameters:
      backgroundImage - the new background image