ParagraphFormat

Inheritance: java.lang.Object

public class ParagraphFormat

Represents all the formatting for a paragraph.

To learn more, visit the Working with Paragraphs documentation article.

Methods

Method Description
clearFormatting() Resets to default paragraph formatting.
equals(Object arg0)
fetchInheritedBorderAttr(int key)
fetchInheritedShadingAttr(int key)
getAddSpaceBetweenFarEastAndAlpha() Gets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.
getAddSpaceBetweenFarEastAndDigit() Gets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.
getAlignment() Gets text alignment for the paragraph.
getBidi() Gets whether this is a right-to-left paragraph.
getBorders() Gets collection of borders of the paragraph.
getCharacterUnitFirstLineIndent() Gets the value (in characters) for the first-line or hanging indent.
getCharacterUnitLeftIndent() Gets the left indent value (in characters) for the specified paragraphs.
getCharacterUnitRightIndent() Gets the right indent value (in characters) for the specified paragraphs.
getClass()
getDirectBorderAttr(int key)
getDropCapPosition() Gets the position for a drop cap text.
getFarEastLineBreakControl() Gets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.
getFirstLineIndent() Gets the value (in points) for a first line or hanging indent.
getHangingPunctuation() Gets a flag indicating whether hanging punctuation is enabled for the current paragraph.
getKeepTogether() True if all lines in the paragraph are to remain on the same page.
getKeepWithNext() True if the paragraph is to remains on the same page as the paragraph that follows it.
getLeftIndent() Gets the value (in points) that represents the left indent for paragraph.
getLineSpacing() Gets the line spacing (in points) for the paragraph.
getLineSpacingRule() Gets the line spacing for the paragraph.
getLineUnitAfter() Gets the amount of spacing (in gridlines) after the paragraphs.
getLineUnitBefore() Gets the amount of spacing (in gridlines) before the paragraphs.
getLinesToDrop() Gets the number of lines of the paragraph text used to calculate the drop cap height.
getNoSpaceBetweenParagraphsOfSameStyle() When true, getSpaceBefore() / setSpaceBefore(double) and getSpaceAfter() / setSpaceAfter(double) will be ignored between the paragraphs of the same style.
getOutlineLevel() Specifies the outline level of the paragraph in the document.
getPageBreakBefore() True if a page break is forced before the paragraph.
getRightIndent() Gets the value (in points) that represents the right indent for paragraph.
getShading() Returns a Shading object that refers to the shading formatting for the paragraph.
getSnapToGrid() Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph.
getSpaceAfter() Gets the amount of spacing (in points) after the paragraph.
getSpaceAfterAuto() True if the amount of spacing after the paragraph is set automatically.
getSpaceBefore() Gets the amount of spacing (in points) before the paragraph.
getSpaceBeforeAuto() True if the amount of spacing before the paragraph is set automatically.
getStyle() Gets the paragraph style applied to this formatting.
getStyleIdentifier() Gets the locale independent style identifier of the paragraph style applied to this formatting.
getStyleName() Gets the name of the paragraph style applied to this formatting.
getSuppressAutoHyphens() Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.
getSuppressLineNumbers() Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section.
getTabStops() Gets the collection of custom tab stops defined for this object.
getWidowControl() True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.
getWordWrap() If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph.
hashCode()
isHeading() True when the paragraph style is one of the built-in Heading styles.
isListItem() True when the paragraph is an item in a bulleted or numbered list.
notify()
notifyAll()
setAddSpaceBetweenFarEastAndAlpha(boolean value) Sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.
setAddSpaceBetweenFarEastAndDigit(boolean value) Sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.
setAlignment(int value) Sets text alignment for the paragraph.
setBidi(boolean value) Sets whether this is a right-to-left paragraph.
setBorderAttr(int key, Object value)
setCharacterUnitFirstLineIndent(double value) Sets the value (in characters) for the first-line or hanging indent.
setCharacterUnitLeftIndent(double value) Sets the left indent value (in characters) for the specified paragraphs.
setCharacterUnitRightIndent(double value) Sets the right indent value (in characters) for the specified paragraphs.
setDropCapPosition(int value) Sets the position for a drop cap text.
setFarEastLineBreakControl(boolean value) Sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.
setFirstLineIndent(double value) Sets the value (in points) for a first line or hanging indent.
setHangingPunctuation(boolean value) Sets a flag indicating whether hanging punctuation is enabled for the current paragraph.
setKeepTogether(boolean value) True if all lines in the paragraph are to remain on the same page.
setKeepWithNext(boolean value) True if the paragraph is to remains on the same page as the paragraph that follows it.
setLeftIndent(double value) Sets the value (in points) that represents the left indent for paragraph.
setLineSpacing(double value) Sets the line spacing (in points) for the paragraph.
setLineSpacingRule(int value) Sets the line spacing for the paragraph.
setLineUnitAfter(double value) Sets the amount of spacing (in gridlines) after the paragraphs.
setLineUnitBefore(double value) Sets the amount of spacing (in gridlines) before the paragraphs.
setLinesToDrop(int value) Sets the number of lines of the paragraph text used to calculate the drop cap height.
setNoSpaceBetweenParagraphsOfSameStyle(boolean value) When true, getSpaceBefore() / setSpaceBefore(double) and getSpaceAfter() / setSpaceAfter(double) will be ignored between the paragraphs of the same style.
setOutlineLevel(int value) Specifies the outline level of the paragraph in the document.
setPageBreakBefore(boolean value) True if a page break is forced before the paragraph.
setRightIndent(double value) Sets the value (in points) that represents the right indent for paragraph.
setSnapToGrid(boolean value) Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph.
setSpaceAfter(double value) Sets the amount of spacing (in points) after the paragraph.
setSpaceAfterAuto(boolean value) True if the amount of spacing after the paragraph is set automatically.
setSpaceBefore(double value) Sets the amount of spacing (in points) before the paragraph.
setSpaceBeforeAuto(boolean value) True if the amount of spacing before the paragraph is set automatically.
setStyle(Style value) Sets the paragraph style applied to this formatting.
setStyleIdentifier(int value) Sets the locale independent style identifier of the paragraph style applied to this formatting.
setStyleName(String value) Sets the name of the paragraph style applied to this formatting.
setSuppressAutoHyphens(boolean value) Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.
setSuppressLineNumbers(boolean value) Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section.
setWidowControl(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.
setWordWrap(boolean value) If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

clearFormatting()

public void clearFormatting()

Resets to default paragraph formatting. Default paragraph formatting is Normal style, left aligned, no indentation, no spacing, no borders and no shading.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

fetchInheritedBorderAttr(int key)

public Object fetchInheritedBorderAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

fetchInheritedShadingAttr(int key)

public Object fetchInheritedShadingAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getAddSpaceBetweenFarEastAndAlpha()

public boolean getAddSpaceBetweenFarEastAndAlpha()

Gets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.

Returns: boolean - A flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.

getAddSpaceBetweenFarEastAndDigit()

public boolean getAddSpaceBetweenFarEastAndDigit()

Gets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.

Returns: boolean - A flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.

getAlignment()

public int getAlignment()

Gets text alignment for the paragraph.

Returns: int - Text alignment for the paragraph. The returned value is one of ParagraphAlignment constants.

getBidi()

public boolean getBidi()

Gets whether this is a right-to-left paragraph.

When true, the runs and other inline objects in this paragraph are laid out right to left.

Returns: boolean - Whether this is a right-to-left paragraph.

getBorders()

public BorderCollection getBorders()

Gets collection of borders of the paragraph.

Returns: BorderCollection - Collection of borders of the paragraph.

getCharacterUnitFirstLineIndent()

public double getCharacterUnitFirstLineIndent()

Gets the value (in characters) for the first-line or hanging indent.

Use positive values to set the first-line indent, and negative values to set the hanging indent.

Returns: double - The value (in characters) for the first-line or hanging indent.

getCharacterUnitLeftIndent()

public double getCharacterUnitLeftIndent()

Gets the left indent value (in characters) for the specified paragraphs.

Returns: double - The left indent value (in characters) for the specified paragraphs.

getCharacterUnitRightIndent()

public double getCharacterUnitRightIndent()

Gets the right indent value (in characters) for the specified paragraphs.

Returns: double - The right indent value (in characters) for the specified paragraphs.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDirectBorderAttr(int key)

public Object getDirectBorderAttr(int key)

Parameters:

Parameter Type Description
key int

Returns: java.lang.Object

getDropCapPosition()

public int getDropCapPosition()

Gets the position for a drop cap text.

Returns: int - The position for a drop cap text. The returned value is one of DropCapPosition constants.

getFarEastLineBreakControl()

public boolean getFarEastLineBreakControl()

Gets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.

Returns: boolean - A flag indicating whether East Asian line-breaking rules are applied to the current paragraph.

getFirstLineIndent()

public double getFirstLineIndent()

Gets the value (in points) for a first line or hanging indent.

Use positive values to set the first-line indent, and negative values to set the hanging indent.

Returns: double - The value (in points) for a first line or hanging indent.

getHangingPunctuation()

public boolean getHangingPunctuation()

Gets a flag indicating whether hanging punctuation is enabled for the current paragraph.

Returns: boolean - A flag indicating whether hanging punctuation is enabled for the current paragraph.

getKeepTogether()

public boolean getKeepTogether()

True if all lines in the paragraph are to remain on the same page.

Returns: boolean - The corresponding boolean value.

getKeepWithNext()

public boolean getKeepWithNext()

True if the paragraph is to remains on the same page as the paragraph that follows it.

Returns: boolean - The corresponding boolean value.

getLeftIndent()

public double getLeftIndent()

Gets the value (in points) that represents the left indent for paragraph.

Returns: double - The value (in points) that represents the left indent for paragraph.

getLineSpacing()

public double getLineSpacing()

Gets the line spacing (in points) for the paragraph.

When LineSpacingRule property is set to AtLeast, the line spacing can be greater than or equal to, but never less than the specified LineSpacing value.

When LineSpacingRule property is set to Exactly, the line spacing never changes from the specified LineSpacing value, even if a larger font is used within the paragraph.

Returns: double - The line spacing (in points) for the paragraph.

getLineSpacingRule()

public int getLineSpacingRule()

Gets the line spacing for the paragraph.

Returns: int - The line spacing for the paragraph. The returned value is one of LineSpacingRule constants.

getLineUnitAfter()

public double getLineUnitAfter()

Gets the amount of spacing (in gridlines) after the paragraphs.

Returns: double - The amount of spacing (in gridlines) after the paragraphs.

getLineUnitBefore()

public double getLineUnitBefore()

Gets the amount of spacing (in gridlines) before the paragraphs.

Returns: double - The amount of spacing (in gridlines) before the paragraphs.

getLinesToDrop()

public int getLinesToDrop()

Gets the number of lines of the paragraph text used to calculate the drop cap height.

Returns: int - The number of lines of the paragraph text used to calculate the drop cap height.

getNoSpaceBetweenParagraphsOfSameStyle()

public boolean getNoSpaceBetweenParagraphsOfSameStyle()

When true, getSpaceBefore() / setSpaceBefore(double) and getSpaceAfter() / setSpaceAfter(double) will be ignored between the paragraphs of the same style.

This setting only takes affect when applied to a paragraph style. If applied to a paragraph directly, it has no effect.

Returns: boolean - The corresponding boolean value.

getOutlineLevel()

public int getOutlineLevel()

Specifies the outline level of the paragraph in the document.

Returns: int - The corresponding int value. The returned value is one of OutlineLevel constants.

getPageBreakBefore()

public boolean getPageBreakBefore()

True if a page break is forced before the paragraph.

Returns: boolean - The corresponding boolean value.

getRightIndent()

public double getRightIndent()

Gets the value (in points) that represents the right indent for paragraph.

Returns: double - The value (in points) that represents the right indent for paragraph.

getShading()

public Shading getShading()

Returns a Shading object that refers to the shading formatting for the paragraph.

Returns: Shading - A Shading object that refers to the shading formatting for the paragraph.

getSnapToGrid()

public boolean getSnapToGrid()

Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph.

Returns: boolean - The corresponding boolean value.

getSpaceAfter()

public double getSpaceAfter()

Gets the amount of spacing (in points) after the paragraph.

Has no effect when getSpaceAfterAuto() / setSpaceAfterAuto(boolean) is true.

Valid values \u200b\u200brange from 0 to 1584 inclusive.

Returns: double - The amount of spacing (in points) after the paragraph.

getSpaceAfterAuto()

public boolean getSpaceAfterAuto()

True if the amount of spacing after the paragraph is set automatically.

When set to true, overrides the effect of getSpaceAfter() / setSpaceAfter(double).

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

Returns: boolean - The corresponding boolean value.

getSpaceBefore()

public double getSpaceBefore()

Gets the amount of spacing (in points) before the paragraph.

Has no effect when getSpaceBeforeAuto() / setSpaceBeforeAuto(boolean) is true.

Valid values range from 0 to 1584 inclusive.

Returns: double - The amount of spacing (in points) before the paragraph.

getSpaceBeforeAuto()

public boolean getSpaceBeforeAuto()

True if the amount of spacing before the paragraph is set automatically.

When set to true, overrides the effect of getSpaceBefore() / setSpaceBefore(double).

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

Returns: boolean - The corresponding boolean value.

getStyle()

public Style getStyle()

Gets the paragraph style applied to this formatting.

Returns: Style - The paragraph style applied to this formatting.

getStyleIdentifier()

public int getStyleIdentifier()

Gets the locale independent style identifier of the paragraph style applied to this formatting.

Returns: int - The locale independent style identifier of the paragraph style applied to this formatting. The returned value is one of StyleIdentifier constants.

getStyleName()

public String getStyleName()

Gets the name of the paragraph style applied to this formatting.

Returns: java.lang.String - The name of the paragraph style applied to this formatting.

getSuppressAutoHyphens()

public boolean getSuppressAutoHyphens()

Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.

Returns: boolean - The corresponding boolean value.

getSuppressLineNumbers()

public boolean getSuppressLineNumbers()

Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section.

Returns: boolean - The corresponding boolean value.

getTabStops()

public TabStopCollection getTabStops()

Gets the collection of custom tab stops defined for this object.

Returns: TabStopCollection - The collection of custom tab stops defined for this object.

getWidowControl()

public boolean getWidowControl()

True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.

Returns: boolean - The corresponding boolean value.

getWordWrap()

public boolean getWordWrap()

If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. Otherwise Latin text is wrapped by whole words.

Returns: boolean - The corresponding boolean value.

hashCode()

public native int hashCode()

Returns: int

isHeading()

public boolean isHeading()

True when the paragraph style is one of the built-in Heading styles.

Returns: boolean - The corresponding boolean value.

isListItem()

public boolean isListItem()

True when the paragraph is an item in a bulleted or numbered list.

Returns: boolean - The corresponding boolean value.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAddSpaceBetweenFarEastAndAlpha(boolean value)

public void setAddSpaceBetweenFarEastAndAlpha(boolean value)

Sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.

Parameters:

Parameter Type Description
value boolean A flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph.

setAddSpaceBetweenFarEastAndDigit(boolean value)

public void setAddSpaceBetweenFarEastAndDigit(boolean value)

Sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.

Parameters:

Parameter Type Description
value boolean A flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph.

setAlignment(int value)

public void setAlignment(int value)

Sets text alignment for the paragraph.

Parameters:

Parameter Type Description
value int Text alignment for the paragraph. The value must be one of ParagraphAlignment constants.

setBidi(boolean value)

public void setBidi(boolean value)

Sets whether this is a right-to-left paragraph.

When true, the runs and other inline objects in this paragraph are laid out right to left.

Parameters:

Parameter Type Description
value boolean Whether this is a right-to-left paragraph.

setBorderAttr(int key, Object value)

public void setBorderAttr(int key, Object value)

Parameters:

Parameter Type Description
key int
value java.lang.Object

setCharacterUnitFirstLineIndent(double value)

public void setCharacterUnitFirstLineIndent(double value)

Sets the value (in characters) for the first-line or hanging indent.

Use positive values to set the first-line indent, and negative values to set the hanging indent.

Parameters:

Parameter Type Description
value double The value (in characters) for the first-line or hanging indent.

setCharacterUnitLeftIndent(double value)

public void setCharacterUnitLeftIndent(double value)

Sets the left indent value (in characters) for the specified paragraphs.

Parameters:

Parameter Type Description
value double The left indent value (in characters) for the specified paragraphs.

setCharacterUnitRightIndent(double value)

public void setCharacterUnitRightIndent(double value)

Sets the right indent value (in characters) for the specified paragraphs.

Parameters:

Parameter Type Description
value double The right indent value (in characters) for the specified paragraphs.

setDropCapPosition(int value)

public void setDropCapPosition(int value)

Sets the position for a drop cap text.

Parameters:

Parameter Type Description
value int The position for a drop cap text. The value must be one of DropCapPosition constants.

setFarEastLineBreakControl(boolean value)

public void setFarEastLineBreakControl(boolean value)

Sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.

Parameters:

Parameter Type Description
value boolean A flag indicating whether East Asian line-breaking rules are applied to the current paragraph.

setFirstLineIndent(double value)

public void setFirstLineIndent(double value)

Sets the value (in points) for a first line or hanging indent.

Use positive values to set the first-line indent, and negative values to set the hanging indent.

Parameters:

Parameter Type Description
value double The value (in points) for a first line or hanging indent.

setHangingPunctuation(boolean value)

public void setHangingPunctuation(boolean value)

Sets a flag indicating whether hanging punctuation is enabled for the current paragraph.

Parameters:

Parameter Type Description
value boolean A flag indicating whether hanging punctuation is enabled for the current paragraph.

setKeepTogether(boolean value)

public void setKeepTogether(boolean value)

True if all lines in the paragraph are to remain on the same page.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setKeepWithNext(boolean value)

public void setKeepWithNext(boolean value)

True if the paragraph is to remains on the same page as the paragraph that follows it.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setLeftIndent(double value)

public void setLeftIndent(double value)

Sets the value (in points) that represents the left indent for paragraph.

Parameters:

Parameter Type Description
value double The value (in points) that represents the left indent for paragraph.

setLineSpacing(double value)

public void setLineSpacing(double value)

Sets the line spacing (in points) for the paragraph.

When LineSpacingRule property is set to AtLeast, the line spacing can be greater than or equal to, but never less than the specified LineSpacing value.

When LineSpacingRule property is set to Exactly, the line spacing never changes from the specified LineSpacing value, even if a larger font is used within the paragraph.

Parameters:

Parameter Type Description
value double The line spacing (in points) for the paragraph.

setLineSpacingRule(int value)

public void setLineSpacingRule(int value)

Sets the line spacing for the paragraph.

Parameters:

Parameter Type Description
value int The line spacing for the paragraph. The value must be one of LineSpacingRule constants.

setLineUnitAfter(double value)

public void setLineUnitAfter(double value)

Sets the amount of spacing (in gridlines) after the paragraphs.

Parameters:

Parameter Type Description
value double The amount of spacing (in gridlines) after the paragraphs.

setLineUnitBefore(double value)

public void setLineUnitBefore(double value)

Sets the amount of spacing (in gridlines) before the paragraphs.

Parameters:

Parameter Type Description
value double The amount of spacing (in gridlines) before the paragraphs.

setLinesToDrop(int value)

public void setLinesToDrop(int value)

Sets the number of lines of the paragraph text used to calculate the drop cap height.

Parameters:

Parameter Type Description
value int The number of lines of the paragraph text used to calculate the drop cap height.

setNoSpaceBetweenParagraphsOfSameStyle(boolean value)

public void setNoSpaceBetweenParagraphsOfSameStyle(boolean value)

When true, getSpaceBefore() / setSpaceBefore(double) and getSpaceAfter() / setSpaceAfter(double) will be ignored between the paragraphs of the same style.

This setting only takes affect when applied to a paragraph style. If applied to a paragraph directly, it has no effect.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setOutlineLevel(int value)

public void setOutlineLevel(int value)

Specifies the outline level of the paragraph in the document.

Parameters:

Parameter Type Description
value int The corresponding int value. The value must be one of OutlineLevel constants.

setPageBreakBefore(boolean value)

public void setPageBreakBefore(boolean value)

True if a page break is forced before the paragraph.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setRightIndent(double value)

public void setRightIndent(double value)

Sets the value (in points) that represents the right indent for paragraph.

Parameters:

Parameter Type Description
value double The value (in points) that represents the right indent for paragraph.

setSnapToGrid(boolean value)

public void setSnapToGrid(boolean value)

Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setSpaceAfter(double value)

public void setSpaceAfter(double value)

Sets the amount of spacing (in points) after the paragraph.

Has no effect when getSpaceAfterAuto() / setSpaceAfterAuto(boolean) is true.

Valid values \u200b\u200brange from 0 to 1584 inclusive.

Parameters:

Parameter Type Description
value double The amount of spacing (in points) after the paragraph.

setSpaceAfterAuto(boolean value)

public void setSpaceAfterAuto(boolean value)

True if the amount of spacing after the paragraph is set automatically.

When set to true, overrides the effect of getSpaceAfter() / setSpaceAfter(double).

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setSpaceBefore(double value)

public void setSpaceBefore(double value)

Sets the amount of spacing (in points) before the paragraph.

Has no effect when getSpaceBeforeAuto() / setSpaceBeforeAuto(boolean) is true.

Valid values range from 0 to 1584 inclusive.

Parameters:

Parameter Type Description
value double The amount of spacing (in points) before the paragraph.

setSpaceBeforeAuto(boolean value)

public void setSpaceBeforeAuto(boolean value)

True if the amount of spacing before the paragraph is set automatically.

When set to true, overrides the effect of getSpaceBefore() / setSpaceBefore(double).

When you set paragraph Space Before and Space After to Auto, Microsoft Word adds 14 points spacing between paragraphs automatically according to the following rules:

  • Normally, spacing is added after all paragraphs.
  • In a bulleted or numbered list, spacing is added only after the last item in the list. Spacing is not added between the list items.
  • In a nested bulleted or numbered list spacing is not added.
  • Spacing is normally added after a table.
  • Spacing is not added after a table if it is the last block in a table cell.
  • Spacing is not added after the last paragraph in a table cell.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setStyle(Style value)

public void setStyle(Style value)

Sets the paragraph style applied to this formatting.

Parameters:

Parameter Type Description
value Style The paragraph style applied to this formatting.

setStyleIdentifier(int value)

public void setStyleIdentifier(int value)

Sets the locale independent style identifier of the paragraph style applied to this formatting.

Parameters:

Parameter Type Description
value int The locale independent style identifier of the paragraph style applied to this formatting. The value must be one of StyleIdentifier constants.

setStyleName(String value)

public void setStyleName(String value)

Sets the name of the paragraph style applied to this formatting.

Parameters:

Parameter Type Description
value java.lang.String The name of the paragraph style applied to this formatting.

setSuppressAutoHyphens(boolean value)

public void setSuppressAutoHyphens(boolean value)

Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setSuppressLineNumbers(boolean value)

public void setSuppressLineNumbers(boolean value)

Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setWidowControl(boolean value)

public void setWidowControl(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.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setWordWrap(boolean value)

public void setWordWrap(boolean value)

If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. Otherwise Latin text is wrapped by whole words.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int