Class PowerpointParagraph
java.lang.Object
pro.verron.officestamper.experimental.PowerpointParagraph
- All Implemented Interfaces:
Paragraph
A "Run" defines a region of text within a docx document with a common set of properties. Word processors are relatively free in splitting a paragraph of text into multiple runs, so there is no strict rule to say over how many runs a word or a string of words is spread.
This class aggregates multiple runs so they can be treated as a single text, no matter how many runs the text spans.
- Since:
- 1.0.8
- Version:
- ${version}
- Author:
- Joseph Verron, Tom Hombergs
-
Constructor Summary
ConstructorsConstructorDescriptionPowerpointParagraph(PptxPart part, org.docx4j.dml.CTTextParagraph paragraph) Constructs a new ParagraphWrapper for the given paragraph. -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the specified consumer function to the paragraph content.asString()Returns the aggregated text over all runs.Collection<org.docx4j.wml.Comments.Comment> Retrieves a collection of comments associated with the paragraph.<T> Optional<T> Retrieves the parent of the current paragraph that matches the specified class type.Retrieves the parent table of the current paragraph, if it exists.Retrieves the parent table row of the current paragraph, if it exists.voidremove()Removes the paragraph from the document.voidReplaces a section of elements within the document, defined by the start and end objects, with the elements provided by the given insert.voidReplaces a placeholder within the paragraph with the content from the given insert, preserving formatting.voidReplaces specified contiguous elements within the paragraph with new elements.toString()
-
Constructor Details
-
PowerpointParagraph
Constructs a new ParagraphWrapper for the given paragraph.- Parameters:
part- the source of the paragraph.paragraph- the paragraph to wrap.
-
-
Method Details
-
replace
Description copied from interface:ParagraphReplaces specified contiguous elements within the paragraph with new elements. -
remove
-
replace
Replaces a placeholder within the paragraph with the content from the given insert, preserving formatting. -
replace
Description copied from interface:ParagraphReplaces a section of elements within the document, defined by the start and end objects, with the elements provided by the given insert. -
asString
-
apply
Description copied from interface:ParagraphApplies the specified consumer function to the paragraph content. -
parent
Description copied from interface:ParagraphRetrieves the parent of the current paragraph that matches the specified class type. -
getComment
Description copied from interface:ParagraphRetrieves a collection of comments associated with the paragraph.- Specified by:
getCommentin interfaceParagraph- Returns:
- a collection of
Comments.Commentobjects related to the paragraph
-
parentTableRow
-
parentTable
-
toString
-