lib/browser/GraphBrowser/AWTFontMetrics.java
author kleing
Tue, 13 Apr 2004 00:43:23 +0200
changeset 14545 71b9ef3d047f
parent 13970 4aef7117817b
child 14981 e73f8140af78
permissions -rw-r--r--
change order of options for jar (fix error on Sun)

/***************************************************************************
  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();
  }
}