Body

Overview

Body is a class in Aspose.Words FOSS for Java. Inherits from: Story.

Represents a container for the main text of a section.

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

This class declares 14 methods for Body objects in Java programs. Available methods include: Body, accept, acceptEnd, acceptStart, appendParagraph, deleteShapes, ensureMinimum, getFirstParagraph, getLastParagraph, getNodeType, getParagraphs, getParentSection, and 2 additional methods. Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package. Properties: firstParagraph, lastParagraph, nodeType, paragraphs, parentSection, storyType, and 1 more.

Properties

NameTypeAccessDescription
nodeTypeintReadReturns Body.
parentSectionSectionReadGets the parent section of this story.
storyTypeintReadGets the type of this story.
firstParagraphParagraphReadGets the first paragraph in the story.
lastParagraphParagraphReadGets the last paragraph in the story.
paragraphsParagraphCollectionReadGets a collection of paragraphs that are immediate children of the story.
tablesTableCollectionReadGets a collection of tables that are immediate children of the story.

Methods

SignatureDescription
Body(doc: DocumentBase)Initializes a new instance of the Body class.
getNodeType() → intReturns Body.
getParentSection() → SectionGets the parent section of this story.
accept(visitor: DocumentVisitor) → booleanCalls accept(visitor) on this Body instance.
acceptStart(visitor: DocumentVisitor) → intAccepts a visitor for visiting the start of the document’s body.
acceptEnd(visitor: DocumentVisitor) → intAccepts a visitor for visiting the end of the document’s body.
ensureMinimum()If the last child is not a paragraph, creates and appends one empty paragraph.
getStoryType() → intGets the type of this story.
getFirstParagraph() → ParagraphGets the first paragraph in the story.
getLastParagraph() → ParagraphGets the last paragraph in the story.
getParagraphs() → ParagraphCollectionGets a collection of paragraphs that are immediate children of the story.
getTables() → TableCollectionGets a collection of tables that are immediate children of the story.
deleteShapes()Deletes all shapes from the text of this story.
appendParagraph(text: String) → ParagraphA shortcut method that creates a Paragraph object with optional text and appends it to the end of this object.

See Also