public class HSSFRichTextString
extends java.lang.Object
implements java.lang.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(java.lang.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(java.lang.Object o)
Compares one rich text string to another.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
getString()
Returns the plain string representation.
|
int |
length() |
int |
numFormattingRuns() |
java.lang.String |
toString() |
public static final short NO_FONT
public HSSFRichTextString()
public HSSFRichTextString(java.lang.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 java.lang.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(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void applyFont(short fontIndex)
fontIndex
- the font to apply.Copyright © 2014 Open Microscopy Environment