Paragraph

Overview

Paragraph is a class in Aspose.Words FOSS for Java. Inherits from: CompositeNode<Node>, IParaAttrSource, IRunAttrSource, and 1 more.

Represents a paragraph of text.

Edition status of its 53 listed members (a property and its accessor methods are listed separately, overloads once): 53 not yet exercised by a verified example.

This class declares 35 methods for Paragraph objects in Java programs. Available methods include: Paragraph, accept, acceptEnd, acceptStart, appendField, getBreakIsStyleSeparator, getEffectiveTabStops, getFrameFormat, getListFormat, getListLabel, getNodeType, getParagraphBreakFont, and 18 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: breakIsStyleSeparator, deleteRevision, effectiveTabStops, endOfCell, endOfDocument, endOfHeaderFooter, and 17 more.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns Paragraph.
parentStoryStoryReadRetrieves the parent section-level story that can be Body or HeaderFooter.
parentSectionSectionReadRetrieves the parent Section of the paragraph.
inCellbooleanReadTrue if this paragraph is an immediate child of Cell; false otherwise.
endOfCellbooleanReadTrue if this paragraph is the last paragraph in a Cell; false otherwise.
breakIsStyleSeparatorbooleanReadTrue if this paragraph break is a Style Separator.
endOfSectionbooleanReadTrue if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise.
endOfHeaderFooterbooleanReadTrue if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise.
endOfDocumentbooleanReadTrue if this paragraph is the last paragraph in the last section of the document.
paragraphFormatParagraphFormatReadProvides access to the paragraph formatting properties.
listFormatListFormatReadProvides access to the list formatting properties of the paragraph.
frameFormatFrameFormatReadProvides access to the frame formatting properties.
listLabelListLabelReadGets a ListLabel object that provides access to list numbering value and formatting for this paragraph.
runsRunCollectionReadProvides access to the typed collection of pieces of text inside the paragraph.
paragraphBreakFontFontReadProvides access to the font formatting of the paragraph break character.
insertRevisionbooleanReadGets the insert revision.
deleteRevisionbooleanReadGets the delete revision.
moveFromRevisionbooleanReadGets the move from revision.
moveToRevisionbooleanReadGets the move to revision.
formatRevisionbooleanReadGets the format revision.
textStringReadGets the text of this paragraph including the end of paragraph character.
listItembooleanReadTrue when the paragraph is an item in a bulleted or numbered list in original revision.
effectiveTabStopsTabStop[]ReadReturns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists.

Methods

SignatureDescription
Paragraph(doc: DocumentBase)Initializes a new instance of the Paragraph class.
getNodeType() → intReturns Paragraph.
getParentStory() → StoryRetrieves the parent section-level story that can be Body or HeaderFooter.
getParentSection() → SectionRetrieves the parent Section of the paragraph.
isInCell() → booleanTrue if this paragraph is an immediate child of Cell; false otherwise.
isEndOfCell() → booleanTrue if this paragraph is the last paragraph in a Cell; false otherwise.
getBreakIsStyleSeparator() → booleanTrue if this paragraph break is a Style Separator.
isEndOfSection() → booleanTrue if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise.
isEndOfHeaderFooter() → booleanTrue if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise.
isEndOfDocument() → booleanTrue if this paragraph is the last paragraph in the last section of the document.
getParagraphFormat() → ParagraphFormatProvides access to the paragraph formatting properties.
getListFormat() → ListFormatProvides access to the list formatting properties of the paragraph.
getFrameFormat() → FrameFormatProvides access to the frame formatting properties.
getListLabel() → ListLabelGets a ListLabel object that provides access to list numbering value and formatting for this paragraph.
getRuns() → RunCollectionProvides access to the typed collection of pieces of text inside the paragraph.
getParagraphBreakFont() → FontProvides access to the font formatting of the paragraph break character.
isInsertRevision() → booleanReturns true if insert revision is set.
isDeleteRevision() → booleanReturns true if delete revision is set.
isMoveFromRevision() → booleanReturns true if move from revision is set.
isMoveToRevision() → booleanReturns true if move to revision is set.
isFormatRevision() → booleanReturns true if format revision is set.
accept(visitor: DocumentVisitor) → booleanCalls accept(visitor) on this Paragraph instance.
acceptStart(visitor: DocumentVisitor) → intAccepts a visitor for visiting the start of the document’s paragraph.
acceptEnd(visitor: DocumentVisitor) → intAccepts a visitor for visiting the end of the document’s paragraph.
getText() → StringGets the text of this paragraph including the end of paragraph character.
isListItem() → booleanTrue when the paragraph is an item in a bulleted or numbered list in original revision.
getEffectiveTabStops() → TabStop[]Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists.
joinRunsWithSameFormatting() → intJoins runs with the same formatting in the paragraph.
joinRunsWithSameFormatting(options: JoinRunsOptions) → intJoins runs with the same formatting in the paragraph.
appendField(fieldType: int, updateField: boolean) → FieldAppends a field to this paragraph.
appendField(fieldCode: String) → FieldAppends a field to this paragraph.
appendField(fieldCode: String, fieldValue: String) → FieldAppends a field to this paragraph.
insertField(fieldType: int, updateField: boolean, refNode: Node, isAfter: boolean) → FieldInserts a field into this paragraph.
insertField(fieldCode: String, refNode: Node, isAfter: boolean) → FieldInserts a field into this paragraph.
insertField(fieldCode: String, fieldValue: String, refNode: Node, isAfter: boolean) → FieldInserts a field into this paragraph.

See Also