HSSFRichTextString
, XSSFRichTextString
public interface RichTextString
Modifier and Type | Method | Description |
---|---|---|
void |
applyFont(int startIndex,
int endIndex,
short fontIndex) |
Applies a font to the specified characters of a string.
|
void |
applyFont(int startIndex,
int endIndex,
Font font) |
Applies a font to the specified characters of a string.
|
void |
applyFont(short fontIndex) |
Applies the specified font to the entire string.
|
void |
applyFont(Font font) |
Sets the font of the entire string.
|
void |
clearFormatting() |
Removes any formatting that may have been applied to the string.
|
int |
getIndexOfFormattingRun(int index) |
The index within the string to which the specified formatting run applies.
|
java.lang.String |
getString() |
Returns the plain string representation.
|
int |
length() |
|
int |
numFormattingRuns() |
void applyFont(int startIndex, int endIndex, short fontIndex)
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.void applyFont(int startIndex, int endIndex, Font font)
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.void applyFont(Font font)
font
- The font to use.void clearFormatting()
java.lang.String getString()
int length()
int numFormattingRuns()
int getIndexOfFormattingRun(int index)
index
- the index of the formatting runvoid applyFont(short fontIndex)
fontIndex
- the font to apply.Copyright 2018 The Apache Software Foundation or its licensors, as applicable.