|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.swing.text.FontInfoImpl
public class FontInfoImpl
Font information.
On the Mac we give the "Times" font two pixels of additional spacing between lines.
Constructor Summary | |
---|---|
FontInfoImpl(java.awt.Font font)
Creates a new font information object. |
|
FontInfoImpl(java.lang.String family,
int style,
int size)
Creates a new font information object. |
Method Summary | |
---|---|
int |
getAscent()
Gets the ascent. |
int |
getDescent()
Gets the descent. |
java.awt.Font |
getFont()
Gets the font. |
int |
getHeight()
Gets the line height. |
int |
getLeading()
Gets the leading. |
int |
stringWidth(java.lang.String str)
Gets the width of a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontInfoImpl(java.awt.Font font)
font
- Font. public FontInfoImpl(java.lang.String family, int style, int size)
family
- Family.style
- Style.size
- Size. Method Detail |
---|
public java.awt.Font getFont()
getFont
in interface FontInfo
public int getHeight()
getHeight
in interface FontInfo
public int getLeading()
getLeading
in interface FontInfo
public int getAscent()
getAscent
in interface FontInfo
public int getDescent()
getDescent
in interface FontInfo
public int stringWidth(java.lang.String str)
stringWidth
in interface FontInfo
str
- String.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |