com.spire.doc.formatting
Class ParagraphFormat

java.lang.Object
  extended by com.spire.doc.OwnerHolder
      extended by com.spire.doc.documents.xml.DocumentSerializable
          extended by com.spire.doc.formatting.FormatBase
              extended by com.spire.doc.formatting.AttrCollection
                  extended by com.spire.doc.formatting.WordAttrCollection
                      extended by com.spire.doc.formatting.ParagraphFormat
All Implemented Interfaces:
IDocumentSerializable

public class ParagraphFormat
extends WordAttrCollection


Constructor Summary
ParagraphFormat()
          Initializes a new instance of the class.
ParagraphFormat(IDocument document)
          Initializes a new instance of the class.
 
Method Summary
 void clearBackground()
          Clears paragraph background.
 boolean getAfterAutoSpacing()
          Gets or sets a value indicating whether spacing after is automatic.
 float getAfterSpacing()
          Returns or sets the spacing (in points) after the paragraph.
 float getAfterSpacingLines()
          Gets or sets a value specifies the spacing that should be added after the last line in this paragraph in the document in line units.
 boolean getAutoSpaceDE()
          Gets or sets the value that determines whether the space is automatically adjusted between Asian and Latin text.
 boolean getAutoSpaceDN()
          Gets or sets the value that determines whether the space is automatically adjusted between Asian text and numbers.
 java.awt.Color getBackColor()
          Gets or sets background color of the paragraph
 boolean getBeforeAutoSpacing()
          Gets or sets a value indicating whether spacing before is automatic.
 float getBeforeSpacing()
          Returns or sets the spacing (in points) before the paragraph.
 float getBeforeSpacingLines()
          Gets or sets a value specifies the spacing that should be added before the first line in this paragraph in the document in line units.
 Borders getBorders()
          Gets collection of borders in the paragraph
 float getFirstLineIndent()
          Gets or sets the value(in points) for first line or hanging indent.Positive value represents first-line indent, and Negative value represents hanging indent.
 float getFirstLineIndentChars()
          Gets or sets the value that represents the paragraph first line indent in character units.
 Frame getFrame()
           
 HorizontalAlignment getHorizontalAlignment()
          Returns or sets horizontal alignment for the paragraph.
 boolean getKeepFollow()
          True if the paragraph is to remains on the same page as the paragraph that follows it.
 boolean getKeepLines()
          True if all lines in the paragraph are to remain on the same page.
 float getLeftIndent()
          Returns or set sthe value that represents the left indent for paragraph.
 float getLeftIndentChars()
          Gets the value that represents the paragraph left indent in character units.
 float getLineSpacing()
          Returns or sets line spacing property of the paragraph.
 LineSpacingRule getLineSpacingRule()
          Returns or sets line spacing rule property of the paragraph.
 boolean getMirrorIndents()
          Gets a value indicating whether indentation type is mirror indents.
 OutlineLevel getOutlineLevel()
          Gets or sets the outline level.
 boolean getOverflowPunc()
          Gets or set allow punctuation to extend past text extents.
 boolean getPageBreakAfter()
          True if a page break is forced after the paragraph
 boolean getPageBreakBefore()
          True if a page break is forced before the paragraph
 float getRightIndent()
          Returns or sets the value that represents the right indent for paragraph.
 float getRightIndentChars()
          Gets the value that represents the paragraph right indent in character units.
 boolean getSnapToGrid()
          Gets or sets a value specifies whether the current paragraph snaps to grid when document grid is defined.
 boolean getSuppressAutoHyphens()
          Indicates whether to suppress automatic hyphenation for the paragraph.
 TabCollection getTabs()
          Gets the tabs info.
 TextAlignment getTextAlignment()
          Gets or sets the style of textalignment
 boolean getWordWrap()
          Gets or sets a value that determines whether allow Latin text to wrap in the middle of a word.
 boolean isBidi()
          Returns or sets right-to-left property of the paragraph.
 void isBidi(boolean value)
          Returns or sets right-to-left property of the paragraph.
 boolean isColumnBreakAfter()
          True if a column break is forced after the paragraph
 void isColumnBreakAfter(boolean value)
          True if a column break is forced after the paragraph
 boolean isFrame()
          Gets a value indicating whether this instance is frame.
 boolean isKinSoku()
          Get or Set a value that determines whether use Asian rules for controlling first and last characters.
 void isKinSoku(boolean value)
          Get or Set a value that determines whether use Asian rules for controlling first and last characters.
 boolean isWidowControl()
          True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.
 void isWidowControl(boolean value)
          True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.
 void setAfterAutoSpacing(boolean value)
          Gets or sets a value indicating whether spacing after is automatic.
 void setAfterSpacing(float value)
          Returns or sets the spacing (in points) after the paragraph.
 void setAfterSpacingLines(float value)
          Gets or sets a value specifies the spacing that should be added after the last line in this paragraph in the document in line units.
 void setAutoSpaceDE(boolean value)
          Gets or sets the value that determines whether the space is automatically adjusted between Asian and Latin text.
 void setAutoSpaceDN(boolean value)
          Gets or sets the value that determines whether the space is automatically adjusted between Asian text and numbers.
 void setBackColor(java.awt.Color value)
          Gets or sets background color of the paragraph
 void setBeforeAutoSpacing(boolean value)
          Gets or sets a value indicating whether spacing before is automatic.
 void setBeforeSpacing(float value)
          Returns or sets the spacing (in points) before the paragraph.
 void setBeforeSpacingLines(float value)
          Gets or sets a value specifies the spacing that should be added before the first line in this paragraph in the document in line units.
 void setFirstLineIndent(float value)
          Gets or sets the value(in points) for first line or hanging indent.Positive value represents first-line indent, and Negative value represents hanging indent.
 void setFirstLineIndentChars(float value)
          Gets or sets the value that represents the paragraph first line indent in character units.
 void setFirstLineIndentCharsEx(float firstLineIndentChars)
          Sets the value that represents the first line indent chars for paragraph.
 void setFirstLineIndentEx(float firstLineIndent)
          Sets the value that represents the first line indent for paragraph.
 void setHorizontalAlignment(HorizontalAlignment value)
          Returns or sets horizontal alignment for the paragraph.
 void setKeepFollow(boolean value)
          True if the paragraph is to remains on the same page as the paragraph that follows it.
 void setKeepLines(boolean value)
          True if all lines in the paragraph are to remain on the same page.
 void setLeftIndent(float value)
          Returns or set sthe value that represents the left indent for paragraph.
 void setLeftIndentChars(float value)
          Sets the value that represents the paragraph left indent in character units.
 void setLeftIndentEx(float leftIndent)
          Sets the value that represents the left indent for paragraph.
 void setLineSpacing(float value)
          Returns or sets line spacing property of the paragraph.
 void setLineSpacingRule(LineSpacingRule value)
          Returns or sets line spacing rule property of the paragraph.
 void setMirrorIndents(boolean value)
          Gets a value indicating whether indentation type is mirror indents.
 void setOutlineLevel(OutlineLevel value)
          Gets or sets the outline level.
 void setOverflowPunc(boolean value)
          Gets or set allow punctuation to extend past text extents.
 void setPageBreakAfter(boolean value)
          True if a page break is forced after the paragraph
 void setPageBreakBefore(boolean value)
          True if a page break is forced before the paragraph
 void setRightIndent(float value)
          Returns or sets the value that represents the right indent for paragraph.
 void setRightIndentChars(float value)
          Sets the value that represents the paragraph right indent in character units.
 void setRightIndentEx(float rightIndent)
          Sets the value that represents the right indent for paragraph.
 void setSnapToGrid(boolean value)
          Gets or sets a value specifies whether the current paragraph snaps to grid when document grid is defined.
 void setSuppressAutoHyphens(boolean value)
          Indicates whether to suppress automatic hyphenation for the paragraph.
 void setTextAlignment(TextAlignment value)
          Gets or sets the style of textalignment
 void setWordWrap(boolean value)
          Gets or sets a value that determines whether allow Latin text to wrap in the middle of a word.
 
Methods inherited from class com.spire.doc.formatting.FormatBase
clearFormatting, hasKey, isDefault
 
Methods inherited from class com.spire.doc.OwnerHolder
getDocument
 

Constructor Detail

ParagraphFormat

public ParagraphFormat()
Initializes a new instance of the class.


ParagraphFormat

public ParagraphFormat(IDocument document)
Initializes a new instance of the class.

Parameters:
document - The document.
Method Detail

isKinSoku

public boolean isKinSoku()
Get or Set a value that determines whether use Asian rules for controlling first and last characters.


isKinSoku

public void isKinSoku(boolean value)
Get or Set a value that determines whether use Asian rules for controlling first and last characters.


getFirstLineIndentChars

public float getFirstLineIndentChars()
Gets or sets the value that represents the paragraph first line indent in character units.


setFirstLineIndentChars

public void setFirstLineIndentChars(float value)
Gets or sets the value that represents the paragraph first line indent in character units.


getLeftIndentChars

public float getLeftIndentChars()
Gets the value that represents the paragraph left indent in character units.


setLeftIndentChars

public void setLeftIndentChars(float value)
Sets the value that represents the paragraph left indent in character units.


getRightIndentChars

public float getRightIndentChars()
Gets the value that represents the paragraph right indent in character units.


setRightIndentChars

public void setRightIndentChars(float value)
Sets the value that represents the paragraph right indent in character units.


isBidi

public boolean isBidi()
Returns or sets right-to-left property of the paragraph.

Returns:
if bidi, set to true.

isBidi

public void isBidi(boolean value)
Returns or sets right-to-left property of the paragraph.


getTabs

public TabCollection getTabs()
Gets the tabs info.

Returns:
The tabs info.

getKeepLines

public boolean getKeepLines()
True if all lines in the paragraph are to remain on the same page.


setKeepLines

public void setKeepLines(boolean value)
True if all lines in the paragraph are to remain on the same page.


getKeepFollow

public boolean getKeepFollow()
True if the paragraph is to remains on the same page as the paragraph that follows it.


setKeepFollow

public void setKeepFollow(boolean value)
True if the paragraph is to remains on the same page as the paragraph that follows it.


getPageBreakBefore

public boolean getPageBreakBefore()
True if a page break is forced before the paragraph


setPageBreakBefore

public void setPageBreakBefore(boolean value)
True if a page break is forced before the paragraph


getPageBreakAfter

public boolean getPageBreakAfter()
True if a page break is forced after the paragraph


setPageBreakAfter

public void setPageBreakAfter(boolean value)
True if a page break is forced after the paragraph


isWidowControl

public boolean isWidowControl()
True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.


isWidowControl

public void isWidowControl(boolean value)
True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.


getAutoSpaceDN

public boolean getAutoSpaceDN()
Gets or sets the value that determines whether the space is automatically adjusted between Asian text and numbers.


setAutoSpaceDN

public void setAutoSpaceDN(boolean value)
Gets or sets the value that determines whether the space is automatically adjusted between Asian text and numbers.


getAutoSpaceDE

public boolean getAutoSpaceDE()
Gets or sets the value that determines whether the space is automatically adjusted between Asian and Latin text.


setAutoSpaceDE

public void setAutoSpaceDE(boolean value)
Gets or sets the value that determines whether the space is automatically adjusted between Asian and Latin text.


getHorizontalAlignment

public HorizontalAlignment getHorizontalAlignment()
Returns or sets horizontal alignment for the paragraph.


setHorizontalAlignment

public void setHorizontalAlignment(HorizontalAlignment value)
Returns or sets horizontal alignment for the paragraph.


getLeftIndent

public float getLeftIndent()
Returns or set sthe value that represents the left indent for paragraph.


setLeftIndent

public void setLeftIndent(float value)
Returns or set sthe value that represents the left indent for paragraph.


getRightIndent

public float getRightIndent()
Returns or sets the value that represents the right indent for paragraph.


setRightIndent

public void setRightIndent(float value)
Returns or sets the value that represents the right indent for paragraph.


getFirstLineIndent

public float getFirstLineIndent()
Gets or sets the value(in points) for first line or hanging indent.Positive value represents first-line indent, and Negative value represents hanging indent.


setFirstLineIndent

public void setFirstLineIndent(float value)
Gets or sets the value(in points) for first line or hanging indent.Positive value represents first-line indent, and Negative value represents hanging indent.


getBeforeSpacing

public float getBeforeSpacing()
Returns or sets the spacing (in points) before the paragraph.


setBeforeSpacing

public void setBeforeSpacing(float value)
Returns or sets the spacing (in points) before the paragraph.


getAfterSpacing

public float getAfterSpacing()
Returns or sets the spacing (in points) after the paragraph.


setAfterSpacing

public void setAfterSpacing(float value)
Returns or sets the spacing (in points) after the paragraph.


getBorders

public Borders getBorders()
Gets collection of borders in the paragraph


getBackColor

public java.awt.Color getBackColor()
Gets or sets background color of the paragraph


setBackColor

public void setBackColor(java.awt.Color value)
Gets or sets background color of the paragraph


isColumnBreakAfter

public boolean isColumnBreakAfter()
True if a column break is forced after the paragraph


isColumnBreakAfter

public void isColumnBreakAfter(boolean value)
True if a column break is forced after the paragraph


getLineSpacing

public float getLineSpacing()
Returns or sets line spacing property of the paragraph.


setLineSpacing

public void setLineSpacing(float value)
Returns or sets line spacing property of the paragraph.


getLineSpacingRule

public LineSpacingRule getLineSpacingRule()
Returns or sets line spacing rule property of the paragraph.


setLineSpacingRule

public void setLineSpacingRule(LineSpacingRule value)
Returns or sets line spacing rule property of the paragraph.


getBeforeAutoSpacing

public boolean getBeforeAutoSpacing()
Gets or sets a value indicating whether spacing before is automatic.

Returns:
if spacing before is automatic, set to true.

setBeforeAutoSpacing

public void setBeforeAutoSpacing(boolean value)
Gets or sets a value indicating whether spacing before is automatic.


getAfterAutoSpacing

public boolean getAfterAutoSpacing()
Gets or sets a value indicating whether spacing after is automatic.

Returns:
if spacing after is automatic, set to true.

setAfterAutoSpacing

public void setAfterAutoSpacing(boolean value)
Gets or sets a value indicating whether spacing after is automatic.


getSnapToGrid

public boolean getSnapToGrid()
Gets or sets a value specifies whether the current paragraph snaps to grid when document grid is defined.


setSnapToGrid

public void setSnapToGrid(boolean value)
Gets or sets a value specifies whether the current paragraph snaps to grid when document grid is defined.


getOutlineLevel

public OutlineLevel getOutlineLevel()
Gets or sets the outline level.

Returns:
The outline level.

setOutlineLevel

public void setOutlineLevel(OutlineLevel value)
Gets or sets the outline level.


getOverflowPunc

public boolean getOverflowPunc()
Gets or set allow punctuation to extend past text extents.


setOverflowPunc

public void setOverflowPunc(boolean value)
Gets or set allow punctuation to extend past text extents.


isFrame

public boolean isFrame()
Gets a value indicating whether this instance is frame.

Returns:
if this instance is frame, set to true.

getFrame

public Frame getFrame()

getWordWrap

public boolean getWordWrap()
Gets or sets a value that determines whether allow Latin text to wrap in the middle of a word.


setWordWrap

public void setWordWrap(boolean value)
Gets or sets a value that determines whether allow Latin text to wrap in the middle of a word.


getBeforeSpacingLines

public float getBeforeSpacingLines()
Gets or sets a value specifies the spacing that should be added before the first line in this paragraph in the document in line units.


setBeforeSpacingLines

public void setBeforeSpacingLines(float value)
Gets or sets a value specifies the spacing that should be added before the first line in this paragraph in the document in line units.


getAfterSpacingLines

public float getAfterSpacingLines()
Gets or sets a value specifies the spacing that should be added after the last line in this paragraph in the document in line units.


setAfterSpacingLines

public void setAfterSpacingLines(float value)
Gets or sets a value specifies the spacing that should be added after the last line in this paragraph in the document in line units.


getTextAlignment

public TextAlignment getTextAlignment()
Gets or sets the style of textalignment


setTextAlignment

public void setTextAlignment(TextAlignment value)
Gets or sets the style of textalignment


getMirrorIndents

public boolean getMirrorIndents()
Gets a value indicating whether indentation type is mirror indents.


setMirrorIndents

public void setMirrorIndents(boolean value)
Gets a value indicating whether indentation type is mirror indents.


getSuppressAutoHyphens

public boolean getSuppressAutoHyphens()
Indicates whether to suppress automatic hyphenation for the paragraph.


setSuppressAutoHyphens

public void setSuppressAutoHyphens(boolean value)
Indicates whether to suppress automatic hyphenation for the paragraph.


setLeftIndentEx

public void setLeftIndentEx(float leftIndent)
Sets the value that represents the left indent for paragraph.

Parameters:
leftIndent - The left indent.

setRightIndentEx

public void setRightIndentEx(float rightIndent)
Sets the value that represents the right indent for paragraph.

Parameters:
rightIndent - The right indent.

setFirstLineIndentEx

public void setFirstLineIndentEx(float firstLineIndent)
Sets the value that represents the first line indent for paragraph.

Parameters:
firstLineIndent - The first line indent.

setFirstLineIndentCharsEx

public void setFirstLineIndentCharsEx(float firstLineIndentChars)
Sets the value that represents the first line indent chars for paragraph.

Parameters:
firstLineIndentChars - The first line indent chars.

clearBackground

public void clearBackground()
Clears paragraph background.

Overrides:
clearBackground in class FormatBase