|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.usermodel.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)
|
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)
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 |