public class HSSFRichTextString extends Object implements Comparable
Modifier and Type | Field and Description |
---|---|
static short |
NO_FONT
Place holder for indicating that NO_FONT has been applied here
|
Constructor and Description |
---|
HSSFRichTextString() |
HSSFRichTextString(String string) |
Modifier and Type | Method and Description |
---|---|
void |
applyFont(HSSFFont font)
Sets the font of the entire string.
|
void |
applyFont(int startIndex,
int endIndex,
HSSFFont font)
Applies a font to the specified characters of a string.
|
void |
applyFont(int startIndex,
int endIndex,
short fontIndex)
Applies a font to the specified characters of a string.
|
void |
applyFont(short fontIndex)
Applies the specified font to the entire string.
|
void |
clearFormatting()
Removes any formatting that may have been applied to the string.
|
int |
compareTo(Object o)
Compares one rich text string to another.
|
boolean |
equals(Object o) |
short |
getFontAtIndex(int index)
Returns the font in use at a particular index.
|
short |
getFontOfFormattingRun(int index)
Gets the font used in a particular formatting run.
|
int |
getIndexOfFormattingRun(int index)
The index within the string to which the specified formatting run applies.
|
String |
getString()
Returns the plain string representation.
|
int |
length() |
int |
numFormattingRuns() |
String |
toString() |
public static final short NO_FONT
public HSSFRichTextString()
public HSSFRichTextString(String string)
public 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.public void applyFont(int startIndex, int endIndex, HSSFFont 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.public void applyFont(HSSFFont font)
font
- The font to use.public void clearFormatting()
public String getString()
public int length()
public short getFontAtIndex(int index)
index
- The index.public int numFormattingRuns()
NO_FONT
public int getIndexOfFormattingRun(int index)
index
- the index of the formatting runpublic short getFontOfFormattingRun(int index)
index
- the index of the formatting runpublic int compareTo(Object o)
compareTo
in interface Comparable
public String toString()
public void applyFont(short fontIndex)
fontIndex
- the font to apply.Copyright © 2014 Open Microscopy Environment