FSF GCC merge 02/23/03
[official-gcc.git] / libjava / gnu / awt / xlib / XFontMetrics.java
blob4e45a1f8250bbb312a61213a897b26486b6ddee2
1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7 details. */
9 package gnu.awt.xlib;
11 import java.awt.FontMetrics;
13 public class XFontMetrics extends FontMetrics
15 gnu.gcj.xlib.Font xfont;
17 public XFontMetrics(gnu.gcj.xlib.Font xfont, java.awt.Font awtFont)
19 super(awtFont);
20 this.xfont = xfont;
23 public int getAscent()
25 return xfont.getAscent();
28 public int getDescent()
30 return xfont.getDescent();
33 public int getMaxAscent()
35 return xfont.getMaxAscent();
38 public int getMaxDescent()
40 return xfont.getMaxDescent();
43 public int stringWidth(String str)
45 return xfont.getStringWidth(str);