|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.usermodel.FontDetails
public class FontDetails
Stores width and height details about a font.
Constructor Summary | |
---|---|
FontDetails(java.lang.String fontName,
int height)
Construct the font details with the given name and height. |
Method Summary | |
---|---|
void |
addChar(char c,
int width)
|
void |
addChars(char[] characters,
int[] widths)
|
protected static java.lang.String |
buildFontCharactersProperty(java.lang.String fontName)
|
protected static java.lang.String |
buildFontHeightProperty(java.lang.String fontName)
|
protected static java.lang.String |
buildFontWidthsProperty(java.lang.String fontName)
|
static FontDetails |
create(java.lang.String fontName,
java.util.Properties fontMetricsProps)
Create an instance of FontDetails by loading them from the
provided property object. |
int |
getCharWidth(char c)
Retrieves the width of the specified character. |
java.lang.String |
getFontName()
|
int |
getHeight()
|
int |
getStringWidth(java.lang.String str)
Gets the width of all characters in a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontDetails(java.lang.String fontName, int height)
fontName
- The font name.height
- The height of the font.Method Detail |
---|
public java.lang.String getFontName()
public int getHeight()
public void addChar(char c, int width)
public int getCharWidth(char c)
public void addChars(char[] characters, int[] widths)
protected static java.lang.String buildFontHeightProperty(java.lang.String fontName)
protected static java.lang.String buildFontWidthsProperty(java.lang.String fontName)
protected static java.lang.String buildFontCharactersProperty(java.lang.String fontName)
public static FontDetails create(java.lang.String fontName, java.util.Properties fontMetricsProps)
FontDetails
by loading them from the
provided property object.
fontName
- the font namefontMetricsProps
- the property object holding the details of this
particular font.
public int getStringWidth(java.lang.String str)
str
- The string to measure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |