Portion

Overview

Portion is a class in Aspose.Slides FOSS for Java. Inherits from: IPortion.

Represents a text portion (run) within a paragraph.

Properties

NameTypeAccessDescription
textStringReadGets or sets the portion’s text
portionFormatIPortionFormatReadProvides access to the portion’s formatting
slideIBaseSlideReadGets or sets the parent slide of the portion
presentationIPresentationReadGets the presentation containing the portion

Methods

SignatureDescription
Portion()Creates a new empty Portion with a detached {@code <a:r>} element.
Portion(text: String)Creates a new Portion with the given text.
Portion(runElement: Element, saveCallback: Runnable)Creates a Portion backed by an existing XML run element.
getText()String
setText(value: String)Sets the text content of the portion
getPortionFormat()IPortionFormatReturns the IPortionFormat associated with the portion
asISlideComponent()ISlideComponent
asIPresentationComponent()IPresentationComponent
getSlide()IBaseSlideReturns the parent slide of the portion
setSlide(slide: IBaseSlide)Sets the parent slide for this portion.
getPresentation()IPresentationReturns the presentation that contains the portion