ParagraphFormat
Overview
ParagraphFormat is a class in Aspose.Words FOSS for Java.
Inherits from: IBorderAttrSource, IShadingAttrSource.
Represents all the formatting for a paragraph.
Edition status of its 122 listed members (a property and its accessor methods are listed separately, overloads once): 122 not yet exercised by a verified example.
This class declares 80 methods for ParagraphFormat objects in Java programs.
Available methods include: clearFormatting, getAddSpaceBetweenFarEastAndAlpha, getAddSpaceBetweenFarEastAndDigit, getAlignment, getBaselineAlignment, getBidi, getBorders, getCharacterUnitFirstLineIndent, getCharacterUnitLeftIndent, getCharacterUnitRightIndent, getDropCapPosition, getFarEastLineBreakControl, and 68 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: addSpaceBetweenFarEastAndAlpha, addSpaceBetweenFarEastAndDigit, alignment, baselineAlignment, bidi, borders, and 36 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
alignment | int | Read/Write | Gets or sets text alignment for the paragraph. |
baselineAlignment | int | Read/Write | Gets or sets fonts vertical position on a line. |
noSpaceBetweenParagraphsOfSameStyle | boolean | Read/Write | When true, SpaceBefore and SpaceAfter will be ignored between the paragraphs of the same style. |
keepTogether | boolean | Read/Write | True if all lines in the paragraph are to remain on the same page. |
keepWithNext | boolean | Read/Write | True if the paragraph is to remains on the same page as the paragraph that follows it. |
pageBreakBefore | boolean | Read/Write | True if a page break is forced before the paragraph. |
suppressLineNumbers | boolean | Read/Write | Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section. |
suppressAutoHyphens | boolean | Read/Write | Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings. |
widowControl | boolean | Read/Write | True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph. |
addSpaceBetweenFarEastAndAlpha | boolean | Read/Write | Gets or 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. |
addSpaceBetweenFarEastAndDigit | boolean | Read/Write | Gets or 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. |
farEastLineBreakControl | boolean | Read/Write | Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph. |
wordWrap | boolean | Read/Write | If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. |
hangingPunctuation | boolean | Read/Write | Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph. |
bidi | boolean | Read/Write | Gets or sets whether this is a right-to-left paragraph. |
leftIndent | double | Read/Write | Gets or sets the value (in points) that represents the left indent for paragraph. |
characterUnitLeftIndent | double | Read/Write | Gets or sets the left indent value (in characters) for the specified paragraphs. |
rightIndent | double | Read/Write | Gets or sets the value (in points) that represents the right indent for paragraph. |
characterUnitRightIndent | double | Read/Write | Gets or sets the right indent value (in characters) for the specified paragraphs. |
firstLineIndent | double | Read/Write | Gets or sets the value (in points) for a first line or hanging indent. |
characterUnitFirstLineIndent | double | Read/Write | Gets or sets the value (in characters) for the first-line or hanging indent. |
spaceBeforeAuto | boolean | Read/Write | True if the amount of spacing before the paragraph is set automatically. |
spaceAfterAuto | boolean | Read/Write | True if the amount of spacing after the paragraph is set automatically. |
spaceBefore | double | Read/Write | Gets or sets the amount of spacing (in points) before the paragraph. |
lineUnitBefore | double | Read/Write | Gets or sets the amount of spacing (in gridlines) before the paragraphs. |
spaceAfter | double | Read/Write | Gets or sets the amount of spacing (in points) after the paragraph. |
lineUnitAfter | double | Read/Write | Gets or sets the amount of spacing (in gridlines) after the paragraphs. |
lineSpacingRule | int | Read/Write | Gets or sets the line spacing for the paragraph. |
lineSpacing | double | Read/Write | Gets or sets the line spacing (in points) for the paragraph. |
mirrorIndents | boolean | Read/Write | Gets or sets a flag indicating whether the left and right indents are of the same width. |
heading | boolean | Read | True when the paragraph style is one of the built-in Heading styles. |
listItem | boolean | Read | True when the paragraph is an item in a bulleted or numbered list. |
outlineLevel | int | Read/Write | Specifies the outline level of the paragraph in the document. |
linesToDrop | int | Read/Write | Gets or sets the number of lines of the paragraph text used to calculate the drop cap height. |
dropCapPosition | int | Read/Write | Gets or sets the position for a drop cap text. |
shading | Shading | Read | Returns a Shading object that refers to the shading formatting for the paragraph. |
borders | BorderCollection | Read | Gets collection of borders of the paragraph. |
style | Style | Read/Write | Gets or sets the paragraph style applied to this formatting. |
styleName | String | Read/Write | Gets or sets the name of the paragraph style applied to this formatting. |
styleIdentifier | int | Read/Write | Gets or sets the locale independent style identifier of the paragraph style applied to this formatting. |
snapToGrid | boolean | Read/Write | Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph. |
tabStops | TabStopCollection | Read | Gets the collection of custom tab stops defined for this object. |
Methods
| Signature | Description |
|---|---|
clearFormatting() | Resets to default paragraph formatting. |
getAlignment() → int | Gets or sets text alignment for the paragraph. |
setAlignment(value: int) | Sets the alignment value. |
getBaselineAlignment() → int | Gets or sets fonts vertical position on a line. |
setBaselineAlignment(value: int) | Sets the baseline alignment value. |
getNoSpaceBetweenParagraphsOfSameStyle() → boolean | When true, SpaceBefore and SpaceAfter will be ignored between the paragraphs of the same style. |
setNoSpaceBetweenParagraphsOfSameStyle(value: boolean) | Sets the no space between paragraphs of same style value. |
getKeepTogether() → boolean | True if all lines in the paragraph are to remain on the same page. |
setKeepTogether(value: boolean) | Sets the keep together value. |
getKeepWithNext() → boolean | True if the paragraph is to remains on the same page as the paragraph that follows it. |
setKeepWithNext(value: boolean) | Sets the keep with next value. |
getPageBreakBefore() → boolean | True if a page break is forced before the paragraph. |
setPageBreakBefore(value: boolean) | Sets the page break before value. |
getSuppressLineNumbers() → boolean | Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section. |
setSuppressLineNumbers(value: boolean) | Sets the suppress line numbers value. |
getSuppressAutoHyphens() → boolean | Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings. |
setSuppressAutoHyphens(value: boolean) | Sets the suppress auto hyphens value. |
getWidowControl() → boolean | True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph. |
setWidowControl(value: boolean) | Sets the widow control value. |
getAddSpaceBetweenFarEastAndAlpha() → boolean | Gets or 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. |
setAddSpaceBetweenFarEastAndAlpha(value: boolean) | Sets the add space between far east and alpha value. |
getAddSpaceBetweenFarEastAndDigit() → boolean | Gets or 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. |
setAddSpaceBetweenFarEastAndDigit(value: boolean) | Sets the add space between far east and digit value. |
getFarEastLineBreakControl() → boolean | Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph. |
setFarEastLineBreakControl(value: boolean) | Sets the far east line break control value. |
getWordWrap() → boolean | If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. |
setWordWrap(value: boolean) | Sets the word wrap value. |
getHangingPunctuation() → boolean | Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph. |
setHangingPunctuation(value: boolean) | Sets the hanging punctuation value. |
getBidi() → boolean | Gets or sets whether this is a right-to-left paragraph. |
setBidi(value: boolean) | Sets the bidi value. |
getLeftIndent() → double | Gets or sets the value (in points) that represents the left indent for paragraph. |
setLeftIndent(value: double) | Sets the left indent value. |
getCharacterUnitLeftIndent() → double | Gets or sets the left indent value (in characters) for the specified paragraphs. |
setCharacterUnitLeftIndent(value: double) | Sets the character unit left indent value. |
getRightIndent() → double | Gets or sets the value (in points) that represents the right indent for paragraph. |
setRightIndent(value: double) | Sets the right indent value. |
getCharacterUnitRightIndent() → double | Gets or sets the right indent value (in characters) for the specified paragraphs. |
setCharacterUnitRightIndent(value: double) | Sets the character unit right indent value. |
getFirstLineIndent() → double | Gets or sets the value (in points) for a first line or hanging indent. |
setFirstLineIndent(value: double) | Sets the first line indent value. |
getCharacterUnitFirstLineIndent() → double | Gets or sets the value (in characters) for the first-line or hanging indent. |
setCharacterUnitFirstLineIndent(value: double) | Sets the character unit first line indent value. |
getSpaceBeforeAuto() → boolean | True if the amount of spacing before the paragraph is set automatically. |
setSpaceBeforeAuto(value: boolean) | Sets the space before auto value. |
getSpaceAfterAuto() → boolean | True if the amount of spacing after the paragraph is set automatically. |
setSpaceAfterAuto(value: boolean) | Sets the space after auto value. |
getSpaceBefore() → double | Gets or sets the amount of spacing (in points) before the paragraph. |
setSpaceBefore(value: double) | Sets the space before value. |
getLineUnitBefore() → double | Gets or sets the amount of spacing (in gridlines) before the paragraphs. |
setLineUnitBefore(value: double) | Sets the line unit before value. |
getSpaceAfter() → double | Gets or sets the amount of spacing (in points) after the paragraph. |
setSpaceAfter(value: double) | Sets the space after value. |
getLineUnitAfter() → double | Gets or sets the amount of spacing (in gridlines) after the paragraphs. |
setLineUnitAfter(value: double) | Sets the line unit after value. |
getLineSpacingRule() → int | Gets or sets the line spacing for the paragraph. |
setLineSpacingRule(value: int) | Sets the line spacing rule value. |
getLineSpacing() → double | Gets or sets the line spacing (in points) for the paragraph. |
setLineSpacing(value: double) | Sets the line spacing value. |
getMirrorIndents() → boolean | Gets or sets a flag indicating whether the left and right indents are of the same width. |
setMirrorIndents(value: boolean) | Sets the mirror indents value. |
isHeading() → boolean | True when the paragraph style is one of the built-in Heading styles. |
isListItem() → boolean | True when the paragraph is an item in a bulleted or numbered list. |
getOutlineLevel() → int | Specifies the outline level of the paragraph in the document. |
setOutlineLevel(value: int) | Sets the outline level value. |
getLinesToDrop() → int | Gets or sets the number of lines of the paragraph text used to calculate the drop cap height. |
setLinesToDrop(value: int) | Sets the lines to drop value. |
getDropCapPosition() → int | Gets or sets the position for a drop cap text. |
setDropCapPosition(value: int) | Sets the drop cap position value. |
getShading() → Shading | Returns a Shading object that refers to the shading formatting for the paragraph. |
getBorders() → BorderCollection | Gets collection of borders of the paragraph. |
getStyle() → Style | Gets or sets the paragraph style applied to this formatting. |
setStyle(value: Style) | Sets the style value. |
getStyleName() → String | Gets or sets the name of the paragraph style applied to this formatting. |
setStyleName(value: String) | Sets the style name value. |
getStyleIdentifier() → int | Gets or sets the locale independent style identifier of the paragraph style applied to this formatting. |
setStyleIdentifier(value: int) | Sets the style identifier value. |
getSnapToGrid() → boolean | Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph. |
setSnapToGrid(value: boolean) | Sets the snap to grid value. |
getTabStops() → TabStopCollection | Gets the collection of custom tab stops defined for this object. |