public final class TextStyle extends PVIObject implements ITextStyle
This class contains the text style formatting properties.
| Modifier and Type | Method and Description |
|---|---|
IParagraphFormat |
getDefaultParagraphFormat()
Default paragraph propertiies.
|
ITextStyleEffectiveData |
getEffective()
Gets effective text style formatting data with the inheritance applied.
|
IParagraphFormat |
getLevel(int index)
If level of style exist returns it, otherwise returns null.
|
long |
getVersion()
Version.
|
equals, getParent_Immediate, getParent_IPresentationComponent, getParent_ISlideComponent, getPresentation, getSlide, hashCodepublic long getVersion()
Version.
Read-only long.
getVersion in class PVIObjectpublic final IParagraphFormat getLevel(int index)
If level of style exist returns it, otherwise returns null.
getLevel in interface ITextStyleindex - Zero-based index of level. Must lay in 0..8 interval.IParagraphFormat.public final IParagraphFormat getDefaultParagraphFormat()
Default paragraph propertiies.
Read-only IParagraphFormat.
getDefaultParagraphFormat in interface ITextStylepublic final ITextStyleEffectiveData getEffective()
Gets effective text style formatting data with the inheritance applied.
This example demonstrates getting some of effective text style properties.Presentation pres = new Presentation("MyPresentation.pptx"); try { IAutoShape shape = (IAutoShape)pres.getSlides().get_Item(0).getShapes().get_Item(0); ITextStyleEffectiveData effectiveTextStyle = shape.getTextFrame().getTextFrameFormat().getTextStyle().getEffective(); for (int i = 0; i <= 8; i++) { IParagraphFormatEffectiveData effectiveStyleLevel = effectiveTextStyle.getLevel(i); System.out.println("= Effective paragraph formatting for style level #" + i + " ="); System.out.println("Depth: " + effectiveStyleLevel.getDepth()); System.out.println("Indent: " + effectiveStyleLevel.getIndent()); System.out.println("Alignment: " + effectiveStyleLevel.getAlignment()); System.out.println("Font alignment: " + effectiveStyleLevel.getFontAlignment()); } } finally { if (pres != null) pres.dispose(); }
getEffective in interface ITextStyleITextStyleEffectiveData.Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.