|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.usermodel.HSSFRichTextString
public class HSSFRichTextString
Rich text unicode string. These strings can have fonts applied to arbitary parts of the string.
Field Summary | |
---|---|
static short |
NO_FONT
Place holder for indicating that NO_FONT has been applied here |
Constructor Summary | |
---|---|
HSSFRichTextString()
|
|
HSSFRichTextString(java.lang.String string)
|
Method Summary | |
---|---|
void |
applyFont(org.apache.poi.ss.usermodel.Font font)
Sets the font of the entire string. |
void |
applyFont(int startIndex,
int endIndex,
org.apache.poi.ss.usermodel.Font 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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short NO_FONT
Constructor Detail |
---|
public HSSFRichTextString()
public HSSFRichTextString(java.lang.String string)
Method Detail |
---|
public void applyFont(int startIndex, int endIndex, short fontIndex)
applyFont
in interface org.apache.poi.ss.usermodel.RichTextString
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, org.apache.poi.ss.usermodel.Font font)
applyFont
in interface org.apache.poi.ss.usermodel.RichTextString
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(org.apache.poi.ss.usermodel.Font font)
applyFont
in interface org.apache.poi.ss.usermodel.RichTextString
font
- The font to use.public void clearFormatting()
clearFormatting
in interface org.apache.poi.ss.usermodel.RichTextString
public java.lang.String getString()
getString
in interface org.apache.poi.ss.usermodel.RichTextString
public int length()
length
in interface org.apache.poi.ss.usermodel.RichTextString
public short getFontAtIndex(int index)
getFontAtIndex
in interface org.apache.poi.ss.usermodel.RichTextString
index
- The index.
public int numFormattingRuns()
numFormattingRuns
in interface org.apache.poi.ss.usermodel.RichTextString
NO_FONT
public int getIndexOfFormattingRun(int index)
getIndexOfFormattingRun
in interface org.apache.poi.ss.usermodel.RichTextString
index
- the index of the formatting run
public short getFontOfFormattingRun(int index)
getFontOfFormattingRun
in interface org.apache.poi.ss.usermodel.RichTextString
index
- the index of the formatting run
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in interface org.apache.poi.ss.usermodel.RichTextString
public boolean equals(java.lang.Object o)
equals
in interface org.apache.poi.ss.usermodel.RichTextString
equals
in class java.lang.Object
public java.lang.String toString()
toString
in interface org.apache.poi.ss.usermodel.RichTextString
toString
in class java.lang.Object
public void applyFont(short fontIndex)
applyFont
in interface org.apache.poi.ss.usermodel.RichTextString
fontIndex
- the font to apply.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |