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
| Name | Type | Access | Description |
|---|---|---|---|
nodeType | int | Read | Returns Paragraph. |
parentStory | Story | Read | Retrieves the parent section-level story that can be Body or HeaderFooter. |
parentSection | Section | Read | Retrieves the parent Section of the paragraph. |
inCell | boolean | Read | True if this paragraph is an immediate child of Cell; false otherwise. |
endOfCell | boolean | Read | True if this paragraph is the last paragraph in a Cell; false otherwise. |
breakIsStyleSeparator | boolean | Read | True if this paragraph break is a Style Separator. |
endOfSection | boolean | Read | True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise. |
endOfHeaderFooter | boolean | Read | True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise. |
endOfDocument | boolean | Read | True if this paragraph is the last paragraph in the last section of the document. |
paragraphFormat | ParagraphFormat | Read | Provides access to the paragraph formatting properties. |
listFormat | ListFormat | Read | Provides access to the list formatting properties of the paragraph. |
frameFormat | FrameFormat | Read | Provides access to the frame formatting properties. |
listLabel | ListLabel | Read | Gets a ListLabel object that provides access to list numbering value and formatting for this paragraph. |
runs | RunCollection | Read | Provides access to the typed collection of pieces of text inside the paragraph. |
paragraphBreakFont | Font | Read | Provides access to the font formatting of the paragraph break character. |
insertRevision | boolean | Read | Gets the insert revision. |
deleteRevision | boolean | Read | Gets the delete revision. |
moveFromRevision | boolean | Read | Gets the move from revision. |
moveToRevision | boolean | Read | Gets the move to revision. |
formatRevision | boolean | Read | Gets the format revision. |
text | String | Read | Gets the text of this paragraph including the end of paragraph character. |
listItem | boolean | Read | True when the paragraph is an item in a bulleted or numbered list in original revision. |
effectiveTabStops | TabStop[] | Read | Returns array of all tab stops applied to this paragraph, including applied indirectly by styles or lists. |
Methods
| Signature | Description |
|---|---|
Paragraph(doc: DocumentBase) | Initializes a new instance of the Paragraph class. |
getNodeType() → int | Returns Paragraph. |
getParentStory() → Story | Retrieves the parent section-level story that can be Body or HeaderFooter. |
getParentSection() → Section | Retrieves the parent Section of the paragraph. |
isInCell() → boolean | True if this paragraph is an immediate child of Cell; false otherwise. |
isEndOfCell() → boolean | True if this paragraph is the last paragraph in a Cell; false otherwise. |
getBreakIsStyleSeparator() → boolean | True if this paragraph break is a Style Separator. |
isEndOfSection() → boolean | True if this paragraph is the last paragraph in the Body (main text story) of a Section; false otherwise. |
isEndOfHeaderFooter() → boolean | True if this paragraph is the last paragraph in the HeaderFooter (main text story) of a Section; false otherwise. |
isEndOfDocument() → boolean | True if this paragraph is the last paragraph in the last section of the document. |
getParagraphFormat() → ParagraphFormat | Provides access to the paragraph formatting properties. |
getListFormat() → ListFormat | Provides access to the list formatting properties of the paragraph. |
getFrameFormat() → FrameFormat | Provides access to the frame formatting properties. |
getListLabel() → ListLabel | Gets a ListLabel object that provides access to list numbering value and formatting for this paragraph. |
getRuns() → RunCollection | Provides access to the typed collection of pieces of text inside the paragraph. |
getParagraphBreakFont() → Font | Provides access to the font formatting of the paragraph break character. |
isInsertRevision() → boolean | Returns true if insert revision is set. |
isDeleteRevision() → boolean | Returns true if delete revision is set. |
isMoveFromRevision() → boolean | Returns true if move from revision is set. |
isMoveToRevision() → boolean | Returns true if move to revision is set. |
isFormatRevision() → boolean | Returns true if format revision is set. |
accept(visitor: DocumentVisitor) → boolean | Calls accept(visitor) on this Paragraph instance. |
acceptStart(visitor: DocumentVisitor) → int | Accepts a visitor for visiting the start of the document’s paragraph. |
acceptEnd(visitor: DocumentVisitor) → int | Accepts a visitor for visiting the end of the document’s paragraph. |
getText() → String | Gets the text of this paragraph including the end of paragraph character. |
isListItem() → boolean | True 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() → int | Joins runs with the same formatting in the paragraph. |
joinRunsWithSameFormatting(options: JoinRunsOptions) → int | Joins runs with the same formatting in the paragraph. |
appendField(fieldType: int, updateField: boolean) → Field | Appends a field to this paragraph. |
appendField(fieldCode: String) → Field | Appends a field to this paragraph. |
appendField(fieldCode: String, fieldValue: String) → Field | Appends a field to this paragraph. |
insertField(fieldType: int, updateField: boolean, refNode: Node, isAfter: boolean) → Field | Inserts a field into this paragraph. |
insertField(fieldCode: String, refNode: Node, isAfter: boolean) → Field | Inserts a field into this paragraph. |
insertField(fieldCode: String, fieldValue: String, refNode: Node, isAfter: boolean) → Field | Inserts a field into this paragraph. |