ParagraphFormat

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

NameTypeAccessDescription
alignmentintRead/WriteGets or sets text alignment for the paragraph.
baselineAlignmentintRead/WriteGets or sets fonts vertical position on a line.
noSpaceBetweenParagraphsOfSameStylebooleanRead/WriteWhen true, SpaceBefore and SpaceAfter will be ignored between the paragraphs of the same style.
keepTogetherbooleanRead/WriteTrue if all lines in the paragraph are to remain on the same page.
keepWithNextbooleanRead/WriteTrue if the paragraph is to remains on the same page as the paragraph that follows it.
pageBreakBeforebooleanRead/WriteTrue if a page break is forced before the paragraph.
suppressLineNumbersbooleanRead/WriteSpecifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section.
suppressAutoHyphensbooleanRead/WriteSpecifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings.
widowControlbooleanRead/WriteTrue if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph.
addSpaceBetweenFarEastAndAlphabooleanRead/WriteGets 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.
addSpaceBetweenFarEastAndDigitbooleanRead/WriteGets 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.
farEastLineBreakControlbooleanRead/WriteGets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph.
wordWrapbooleanRead/WriteIf this property is false, Latin text in the middle of a word can be wrapped for the current paragraph.
hangingPunctuationbooleanRead/WriteGets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph.
bidibooleanRead/WriteGets or sets whether this is a right-to-left paragraph.
leftIndentdoubleRead/WriteGets or sets the value (in points) that represents the left indent for paragraph.
characterUnitLeftIndentdoubleRead/WriteGets or sets the left indent value (in characters) for the specified paragraphs.
rightIndentdoubleRead/WriteGets or sets the value (in points) that represents the right indent for paragraph.
characterUnitRightIndentdoubleRead/WriteGets or sets the right indent value (in characters) for the specified paragraphs.
firstLineIndentdoubleRead/WriteGets or sets the value (in points) for a first line or hanging indent.
characterUnitFirstLineIndentdoubleRead/WriteGets or sets the value (in characters) for the first-line or hanging indent.
spaceBeforeAutobooleanRead/WriteTrue if the amount of spacing before the paragraph is set automatically.
spaceAfterAutobooleanRead/WriteTrue if the amount of spacing after the paragraph is set automatically.
spaceBeforedoubleRead/WriteGets or sets the amount of spacing (in points) before the paragraph.
lineUnitBeforedoubleRead/WriteGets or sets the amount of spacing (in gridlines) before the paragraphs.
spaceAfterdoubleRead/WriteGets or sets the amount of spacing (in points) after the paragraph.
lineUnitAfterdoubleRead/WriteGets or sets the amount of spacing (in gridlines) after the paragraphs.
lineSpacingRuleintRead/WriteGets or sets the line spacing for the paragraph.
lineSpacingdoubleRead/WriteGets or sets the line spacing (in points) for the paragraph.
mirrorIndentsbooleanRead/WriteGets or sets a flag indicating whether the left and right indents are of the same width.
headingbooleanReadTrue when the paragraph style is one of the built-in Heading styles.
listItembooleanReadTrue when the paragraph is an item in a bulleted or numbered list.
outlineLevelintRead/WriteSpecifies the outline level of the paragraph in the document.
linesToDropintRead/WriteGets or sets the number of lines of the paragraph text used to calculate the drop cap height.
dropCapPositionintRead/WriteGets or sets the position for a drop cap text.
shadingShadingReadReturns a Shading object that refers to the shading formatting for the paragraph.
bordersBorderCollectionReadGets collection of borders of the paragraph.
styleStyleRead/WriteGets or sets the paragraph style applied to this formatting.
styleNameStringRead/WriteGets or sets the name of the paragraph style applied to this formatting.
styleIdentifierintRead/WriteGets or sets the locale independent style identifier of the paragraph style applied to this formatting.
snapToGridbooleanRead/WriteSpecifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph.
tabStopsTabStopCollectionReadGets the collection of custom tab stops defined for this object.

Methods

SignatureDescription
clearFormatting()Resets to default paragraph formatting.
getAlignment() → intGets or sets text alignment for the paragraph.
setAlignment(value: int)Sets the alignment value.
getBaselineAlignment() → intGets or sets fonts vertical position on a line.
setBaselineAlignment(value: int)Sets the baseline alignment value.
getNoSpaceBetweenParagraphsOfSameStyle() → booleanWhen 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() → booleanTrue if all lines in the paragraph are to remain on the same page.
setKeepTogether(value: boolean)Sets the keep together value.
getKeepWithNext() → booleanTrue 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() → booleanTrue if a page break is forced before the paragraph.
setPageBreakBefore(value: boolean)Sets the page break before value.
getSuppressLineNumbers() → booleanSpecifies 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() → booleanSpecifies 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() → booleanTrue 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() → booleanGets 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() → booleanGets 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() → booleanGets 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() → booleanIf 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() → booleanGets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph.
setHangingPunctuation(value: boolean)Sets the hanging punctuation value.
getBidi() → booleanGets or sets whether this is a right-to-left paragraph.
setBidi(value: boolean)Sets the bidi value.
getLeftIndent() → doubleGets or sets the value (in points) that represents the left indent for paragraph.
setLeftIndent(value: double)Sets the left indent value.
getCharacterUnitLeftIndent() → doubleGets or sets the left indent value (in characters) for the specified paragraphs.
setCharacterUnitLeftIndent(value: double)Sets the character unit left indent value.
getRightIndent() → doubleGets or sets the value (in points) that represents the right indent for paragraph.
setRightIndent(value: double)Sets the right indent value.
getCharacterUnitRightIndent() → doubleGets or sets the right indent value (in characters) for the specified paragraphs.
setCharacterUnitRightIndent(value: double)Sets the character unit right indent value.
getFirstLineIndent() → doubleGets or sets the value (in points) for a first line or hanging indent.
setFirstLineIndent(value: double)Sets the first line indent value.
getCharacterUnitFirstLineIndent() → doubleGets 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() → booleanTrue if the amount of spacing before the paragraph is set automatically.
setSpaceBeforeAuto(value: boolean)Sets the space before auto value.
getSpaceAfterAuto() → booleanTrue if the amount of spacing after the paragraph is set automatically.
setSpaceAfterAuto(value: boolean)Sets the space after auto value.
getSpaceBefore() → doubleGets or sets the amount of spacing (in points) before the paragraph.
setSpaceBefore(value: double)Sets the space before value.
getLineUnitBefore() → doubleGets or sets the amount of spacing (in gridlines) before the paragraphs.
setLineUnitBefore(value: double)Sets the line unit before value.
getSpaceAfter() → doubleGets or sets the amount of spacing (in points) after the paragraph.
setSpaceAfter(value: double)Sets the space after value.
getLineUnitAfter() → doubleGets or sets the amount of spacing (in gridlines) after the paragraphs.
setLineUnitAfter(value: double)Sets the line unit after value.
getLineSpacingRule() → intGets or sets the line spacing for the paragraph.
setLineSpacingRule(value: int)Sets the line spacing rule value.
getLineSpacing() → doubleGets or sets the line spacing (in points) for the paragraph.
setLineSpacing(value: double)Sets the line spacing value.
getMirrorIndents() → booleanGets 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() → booleanTrue when the paragraph style is one of the built-in Heading styles.
isListItem() → booleanTrue when the paragraph is an item in a bulleted or numbered list.
getOutlineLevel() → intSpecifies the outline level of the paragraph in the document.
setOutlineLevel(value: int)Sets the outline level value.
getLinesToDrop() → intGets 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() → intGets or sets the position for a drop cap text.
setDropCapPosition(value: int)Sets the drop cap position value.
getShading() → ShadingReturns a Shading object that refers to the shading formatting for the paragraph.
getBorders() → BorderCollectionGets collection of borders of the paragraph.
getStyle() → StyleGets or sets the paragraph style applied to this formatting.
setStyle(value: Style)Sets the style value.
getStyleName() → StringGets or sets the name of the paragraph style applied to this formatting.
setStyleName(value: String)Sets the style name value.
getStyleIdentifier() → intGets or sets the locale independent style identifier of the paragraph style applied to this formatting.
setStyleIdentifier(value: int)Sets the style identifier value.
getSnapToGrid() → booleanSpecifies 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() → TabStopCollectionGets the collection of custom tab stops defined for this object.

See Also