/[classpath]/classpath/java/awt/Font.java
ViewVC logotype

Diff of /classpath/java/awt/Font.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mark, Sun Jan 13 15:45:15 2002 UTC revision 1.4 by tromey, Tue Jan 22 22:00:14 2002 UTC
# Line 1  Line 1 
1  /* Font.java -- Font object  /* Font.java -- Font object
2     Copyright (C) 1999 Free Software Foundation, Inc.     Copyright (C) 1999, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 34  import java.util.StringTokenizer; Line 34  import java.util.StringTokenizer;
34    * This class represents a windowing system font.    * This class represents a windowing system font.
35    *    *
36    * @author Aaron M. Renn (arenn@urbanophile.com)    * @author Aaron M. Renn (arenn@urbanophile.com)
37      * @author Warren Levy <warrenl@cygnus.com>
38    */    */
39  public class Font implements java.io.Serializable  public class Font implements java.io.Serializable
40  {  {
# Line 57  public static final int BOLD = 1; Line 58  public static final int BOLD = 1;
58    */    */
59  public static final int ITALIC = 2;  public static final int ITALIC = 2;
60    
61    public static final int ROMAN_BASELINE = 0;
62    public static final int CENTER_BASELINE = 1;
63    public static final int HANGING_BASELINE = 2;
64    
65  // Serialization constant  // Serialization constant
66  private static final long serialVersionUID = -4206021311591459213L;  private static final long serialVersionUID = -4206021311591459213L;
67    
# Line 82  protected int style; Line 87  protected int style;
87    */    */
88  protected int size;  protected int size;
89    
90    protected float pointSize;
91    
92  // The native peer for this font  // The native peer for this font
93  private FontPeer peer;  private FontPeer peer;
94    
# Line 204  getFont(String propname) Line 211  getFont(String propname)
211    * @param style The font style.    * @param style The font style.
212    * @param size The font point size.    * @param size The font point size.
213    */    */
214  public  public
215  Font(String name, int style, int size)  Font(String name, int style, int size)
216  {  {
217    this.name = name;    this.name = name;
218    this.style = style;    this.style = style;
219    this.size = size;    this.size = size;
220      this.pointSize = size;
221  }  }
222    
223  /*************************************************************************/  /*************************************************************************/
# Line 242  getSize() Line 250  getSize()
250    return(size);    return(size);
251  }  }
252    
253    public float
254    getSize2D()
255    {
256      return pointSize;
257    }
258    
259  /*************************************************************************/  /*************************************************************************/
260    
261  /**  /**
# Line 308  getFamily() Line 322  getFamily()
322    return(name);    return(name);
323  }  }
324    
325    public int
326    getStyle()
327    {
328      return style;
329    }
330    
331  /*************************************************************************/  /*************************************************************************/
332    
333  /**  /**

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26