Java in a Nutshell Online Quick Reference for Java 1.1

CLASS java.awt.FontMetrics

Availability: JDK 1.0

public abstract class FontMetrics extends Object implements Serializable {
   // Protected Constructor
      protected FontMetrics(Font font);
   // Protected Instance Variables
      protected Font font;
   // Public Instance Methods
      public int bytesWidth(byte[] data, int off, int len);
      public int charWidth(int ch);
      public int charWidth(char ch);
      public int charsWidth(char[] data, int off, int len);
      public int getAscent();
      public int getDescent();
      public Font getFont();
      public int getHeight();
      public int getLeading();
      public int getMaxAdvance();
      public int getMaxAscent();
      public int getMaxDecent();
      public int getMaxDescent();
      public int[] getWidths();
      public int stringWidth(String str);
      public String toString();  // Overrides Object.toString()
}
Returned By:
Component.getFontMetrics(), ComponentPeer.getFontMetrics(), Graphics.getFontMetrics(), Toolkit.getFontMetrics().

Java in a Nutshell Online Quick Reference for Java 1.1
Created by David Flanagan. Copyright © 1997 by O'Reilly & Associates.