Package org.apache.poi.xssf.binary
Class XSSFBRichTextString
java.lang.Object
org.apache.poi.xssf.binary.XSSFBRichTextString
- All Implemented Interfaces:
RichTextString
Wrapper class around String so that we can use it in Comment.
Nothing has been implemented yet except for
getString().- Since:
- 3.16-beta3
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyFont(int startIndex, int endIndex, short fontIndex) Applies a font to the specified characters of a string.voidApplies a font to the specified characters of a string.voidapplyFont(short fontIndex) Applies the specified font to the entire string.voidSets the font of the entire string.voidRemoves any formatting that may have been applied to the string.intgetIndexOfFormattingRun(int index) The index within the string to which the specified formatting run applies.Returns the plain string representation.intlength()inttoString()
-
Method Details
-
applyFont
Description copied from interface:RichTextStringApplies a font to the specified characters of a string.- Specified by:
applyFontin interfaceRichTextString- Parameters:
startIndex- The start index to apply the font to (inclusive)endIndex- The end index to apply the font to (exclusive)fontIndex- The font to use.
-
applyFont
Description copied from interface:RichTextStringApplies a font to the specified characters of a string.- Specified by:
applyFontin interfaceRichTextString- Parameters:
startIndex- The start index to apply the font to (inclusive)endIndex- The end index to apply to font to (exclusive)font- The index of the font to use.
-
applyFont
Description copied from interface:RichTextStringSets the font of the entire string.- Specified by:
applyFontin interfaceRichTextString- Parameters:
font- The font to use.
-
clearFormatting
Description copied from interface:RichTextStringRemoves any formatting that may have been applied to the string.- Specified by:
clearFormattingin interfaceRichTextString
-
getString
Description copied from interface:RichTextStringReturns the plain string representation.- Specified by:
getStringin interfaceRichTextString
-
toString
-
length
public int length()- Specified by:
lengthin interfaceRichTextString- Returns:
- the number of characters in the font.
-
numFormattingRuns
- Specified by:
numFormattingRunsin interfaceRichTextString- Returns:
- The number of formatting runs used.
-
getIndexOfFormattingRun
Description copied from interface:RichTextStringThe index within the string to which the specified formatting run applies.- Specified by:
getIndexOfFormattingRunin interfaceRichTextString- Parameters:
index- the index of the formatting run- Returns:
- the index within the string.
-
applyFont
Description copied from interface:RichTextStringApplies the specified font to the entire string.- Specified by:
applyFontin interfaceRichTextString- Parameters:
fontIndex- the font to apply.
-