|
http://www.eteks.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.FontMetrics
com.eteks.awt.PJAFontMetrics
Pure Java AWT Font Metrics implementation. This class returns the metrics
of a given font (name + style + sizes).
From version 1.1, all the font data management moved to the new class PJAFontData
to avoid using PJAFontMetrics which extends this class in PJAGraphics code
(java.awt.FontMetrics requires awt library to be loaded to call initIDs native method).
| Field Summary |
| Fields inherited from class java.awt.FontMetrics |
font |
| Constructor Summary | |
protected |
PJAFontMetrics(java.awt.Font font,
PJAFontData fontData)
|
| Method Summary | |
int |
charsWidth(char[] data,
int offset,
int len)
java.awt.FontMetrics implementation.
|
int |
charWidth(char ch)
java.awt.FontMetrics implementation.
|
int |
charWidth(int ch)
java.awt.FontMetrics implementation.
|
int |
getAscent()
java.awt.FontMetrics implementation.
|
int |
getCharOffsetAtBaseline(char ch)
Deprecated. As of PJA version 1.1, replaced by PJAFontData.getCharOffsetAtBaseline (). |
int[] |
getCharPixels(char ch)
Deprecated. As of PJA version 1.1, replaced by PJAFontData.getCharPixels (). |
int |
getCharPixelsWidth(char ch)
Deprecated. As of PJA version 1.1, replaced by PJAFontData.getCharPixelsWidth (). |
int |
getDescent()
java.awt.FontMetrics implementation.
|
int |
getLeading()
java.awt.FontMetrics implementation.
|
int |
getMaxAdvance()
java.awt.FontMetrics implementation.
|
int |
getMaxAscent()
java.awt.FontMetrics implementation.
|
int |
getMaxDescent()
java.awt.FontMetrics implementation.
|
protected void |
setFont(java.awt.Font font)
Deprecated. As of PJA version 1.1, PJAFontPeer doesn't need it anymore. |
| Methods inherited from class java.awt.FontMetrics |
bytesWidth, getFont, getHeight, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMaxDecent, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getWidths, hasUniformLineMetrics, stringWidth, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected PJAFontMetrics(java.awt.Font font,
PJAFontData fontData)
| Method Detail |
protected void setFont(java.awt.Font font)
PJAFontPeer doesn't need it anymore.
font - The matching font for this metrics.public int getLeading()
java.awt.FontMetrics implementation.
Returns the leading of this font.
PJAFontDatapublic int getAscent()
java.awt.FontMetrics implementation.
Returns the ascent of this font.
PJAFontDatapublic int getDescent()
java.awt.FontMetrics implementation.
Returns the descent of this font.
PJAFontDatapublic int getMaxAscent()
java.awt.FontMetrics implementation.
Returns the max ascent of this font.
PJAFontDatapublic int getMaxDescent()
java.awt.FontMetrics implementation.
Returns the max descent of this font.
PJAFontDatapublic int getMaxAdvance()
java.awt.FontMetrics implementation.
Returns the max advance of this font.
PJAFontDatapublic int charWidth(int ch)
java.awt.FontMetrics implementation.
Returns the char width of the character ch in this font.
PJAFontDatapublic int charWidth(char ch)
java.awt.FontMetrics implementation.
Returns the char width of the character ch in this font.
(need to override charWidth (char ch) of the class
java.awt.FontMetrics to avoid stack overflow in getWidths ())
PJAFontData
public int charsWidth(char[] data,
int offset,
int len)
java.awt.FontMetrics implementation.
Returns the string width of a string in this font.
PJAFontDatapublic int[] getCharPixels(char ch)
ch.
PJAFontDatapublic int getCharPixelsWidth(char ch)
ch.
PJAFontDatapublic int getCharOffsetAtBaseline(char ch)
ch to add at baseline.
PJAFontData
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||