Section
Overview
Section is a class in Aspose.Words FOSS for Java.
Inherits from: CompositeNode<Node>, ISectionAttrSource.
Represents a single section in a document.
Edition status of its 23 listed members (a property and its accessor methods are listed separately, overloads once): 23 not yet exercised by a verified example.
This class declares 19 methods for Section objects in Java programs.
Available methods include: Section, accept, acceptEnd, acceptStart, appendContent, clearContent, clearHeadersFooters, deepClone, deleteHeaderFooterShapes, ensureMinimum, getBody, getHeadersFooters, and 6 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: body, headersFooters, nodeType, pageSetup, protectedForForms.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
nodeType | int | Read | Returns Section. |
body | Body | Read | Returns the Body child node of the section. |
headersFooters | HeaderFooterCollection | Read | Provides access to the headers and footers nodes of the section. |
pageSetup | PageSetup | Read | Returns an object that represents page setup and section properties. |
protectedForForms | boolean | Read/Write | True if the section is protected for forms. |
Methods
| Signature | Description |
|---|---|
Section(doc: DocumentBase) | Initializes a new instance of the Section class. |
getNodeType() → int | Returns Section. |
getBody() → Body | Returns the Body child node of the section. |
getHeadersFooters() → HeaderFooterCollection | Provides access to the headers and footers nodes of the section. |
getPageSetup() → PageSetup | Returns an object that represents page setup and section properties. |
getProtectedForForms() → boolean | True if the section is protected for forms. |
setProtectedForForms(value: boolean) | Sets the protected for forms value. |
deepClone() → Section | Creates a duplicate of this section. |
accept(visitor: DocumentVisitor) → boolean | Calls accept(visitor) on this Section instance. |
acceptStart(visitor: DocumentVisitor) → int | Calls acceptStart(visitor) on this Section instance. |
acceptEnd(visitor: DocumentVisitor) → int | Calls acceptEnd(visitor) on this Section instance. |
prependContent(sourceSection: Section) | Inserts a copy of content of the source section at the beginning of this section. |
appendContent(sourceSection: Section) | Inserts a copy of content of the source section at the end of this section. |
clearContent() | Clears the section. |
clearHeadersFooters() | Clears the headers and footers of this section. |
clearHeadersFooters(preserveWatermarks: boolean) | Clears the headers and footers of this section. |
deleteHeaderFooterShapes() | Deletes all shapes (drawing objects) from the headers and footers of this section. |
ensureMinimum() | Ensures that the section has Body with one Paragraph. |
toString() → String | Calls toString on this Section instance. |