lib/browser/GraphBrowser/AWTFontMetrics.java
author paulson
Tue, 19 Aug 2003 13:53:58 +0200
changeset 14152 12f6f18e7afc
parent 13970 4aef7117817b
child 14981 e73f8140af78
permissions -rw-r--r--
For the Isar version of the ZF logics manual

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