swingwt.awt
Class FontMetrics
java.lang.Object
swingwt.awt.FontMetrics
- public class FontMetrics
- extends java.lang.Object
Field Summary |
protected Font |
font
|
protected org.eclipse.swt.graphics.GC |
gc
An SWT graphics context used to get info about the font |
protected org.eclipse.swt.graphics.Image |
im
A drawable surface for the GC to be generated from |
Method Summary |
int |
bytesWidth(byte[] data,
int off,
int len)
|
int |
charsWidth(char[] data,
int off,
int len)
|
int |
charWidth(char ch)
|
int |
charWidth(int ch)
|
int |
getAscent()
|
int |
getDescent()
|
Font |
getFont()
|
int |
getHeight()
|
int |
getLeading()
|
LineMetrics |
getLineMetrics(char[] chars,
int beginIndex,
int limit,
Graphics context)
|
LineMetrics |
getLineMetrics(java.lang.String str,
Graphics context)
|
LineMetrics |
getLineMetrics(java.lang.String str,
int beginIndex,
int limit,
Graphics context)
|
int |
getMaxAdvance()
|
int |
getMaxAscent()
|
Rectangle2D |
getMaxCharBounds(Graphics context)
|
int |
getMaxDecent()
|
int |
getMaxDescent()
|
Rectangle2D |
getStringBounds(char[] chars,
int beginIndex,
int limit,
Graphics context)
|
Rectangle2D |
getStringBounds(java.lang.String str,
Graphics context)
|
Rectangle2D |
getStringBounds(java.lang.String str,
int beginIndex,
int limit,
Graphics context)
|
int[] |
getWidths()
|
boolean |
hasUniformLineMetrics()
|
int |
stringWidth(java.lang.String str)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
font
protected Font font
gc
protected org.eclipse.swt.graphics.GC gc
- An SWT graphics context used to get info about the font
im
protected org.eclipse.swt.graphics.Image im
- A drawable surface for the GC to be generated from
FontMetrics
protected FontMetrics(Font font)
getFont
public Font getFont()
getLeading
public int getLeading()
getAscent
public int getAscent()
getDescent
public int getDescent()
getHeight
public int getHeight()
getMaxAscent
public int getMaxAscent()
getMaxDescent
public int getMaxDescent()
getMaxDecent
public int getMaxDecent()
getMaxAdvance
public int getMaxAdvance()
charWidth
public int charWidth(int ch)
charWidth
public int charWidth(char ch)
stringWidth
public int stringWidth(java.lang.String str)
charsWidth
public int charsWidth(char[] data,
int off,
int len)
bytesWidth
public int bytesWidth(byte[] data,
int off,
int len)
getWidths
public int[] getWidths()
hasUniformLineMetrics
public boolean hasUniformLineMetrics()
getLineMetrics
public LineMetrics getLineMetrics(java.lang.String str,
Graphics context)
getLineMetrics
public LineMetrics getLineMetrics(java.lang.String str,
int beginIndex,
int limit,
Graphics context)
getLineMetrics
public LineMetrics getLineMetrics(char[] chars,
int beginIndex,
int limit,
Graphics context)
getStringBounds
public Rectangle2D getStringBounds(java.lang.String str,
Graphics context)
getStringBounds
public Rectangle2D getStringBounds(java.lang.String str,
int beginIndex,
int limit,
Graphics context)
getStringBounds
public Rectangle2D getStringBounds(char[] chars,
int beginIndex,
int limit,
Graphics context)
getMaxCharBounds
public Rectangle2D getMaxCharBounds(Graphics context)
toString
public java.lang.String toString()