lib/browser/GraphBrowser/AWTFontMetrics.java
author paulson
Tue, 10 Feb 2004 12:02:11 +0100
changeset 14378 69c4d5997669
parent 13970 4aef7117817b
child 14981 e73f8140af78
permissions -rw-r--r--
generic of_nat and of_int functions, and generalization of iszero and neg

/***************************************************************************
  Title:      GraphBrowser/AWTFontMetrics.java
  ID:         $Id$
  Author:     Gerwin Klein, TU Muenchen
  Copyright   2003  TU Muenchen
  License:    GPL (GNU GENERAL PUBLIC LICENSE)

  AbstractFontMetrics from the AWT for graphics mode.
  
***************************************************************************/

package GraphBrowser;

import java.awt.FontMetrics;

public class AWTFontMetrics implements AbstractFontMetrics {
  private FontMetrics fontMetrics;

  public AWTFontMetrics(FontMetrics m) {
    fontMetrics = m;
  }

  public int stringWidth(String str) {
    return fontMetrics.stringWidth(str);
  }

  public int getAscent() {
    return fontMetrics.getAscent();
  }

  public int getDescent() {
    return fontMetrics.getDescent();
  }
}