/[classpath]/classpath/javax/swing/plaf/FontUIResource.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/FontUIResource.java

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

revision 1.2 by egagnon, Sun Aug 11 20:08:43 2002 UTC revision 1.3 by brawer, Tue Jun 24 14:08:45 2003 UTC
# Line 1  Line 1 
1  /* FontUIResource.java  /* FontUIResource.java
2     Copyright (C) 2002 Free Software Foundation, Inc.     Copyright (C) 2003 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 37  exception statement from your version. * Line 37  exception statement from your version. *
37    
38    
39  package javax.swing.plaf;  package javax.swing.plaf;
40    
41  import java.awt.Font;  import java.awt.Font;
42    
43    
44  /**  /**
45   * STUBBED   * A font that is marked as <code>UIResource</code>, which
46     * indicates that it has been installed by a pluggable
47     * LookAndFeel. Such dimensions are replaced when the LookAndFeel
48     * changes.
49     *
50     * @author Andrew Selkirk (aselkirk@sympatico.ca)
51     * @author Sascha Brawer (brawer@dandelis.ch)
52   */   */
53  public class FontUIResource extends Font implements UIResource  public class FontUIResource
54      extends Font
55      implements UIResource
56  {  {
57    public FontUIResource(Font f)    /**
58    {     * Constructs a new <code>FontUIResource</code> given
59      super(f.getName(), f.getStyle(), f.getSize());     * the name, style and size of the font.
60    }     *
61       * @param name the name of the font. A number of
62       *        &#x201c;logical&#x201d; names are supported by any Java
63       *        implementation. These are
64       *        <code>&#x201c;Dialog&#x201d;</code>,
65       *        <code>&#x201c;DialogInput&#x201d;</code>,
66       *        <code>&#x201c;Monospaced&#x201d;</code>,
67       *        <code>&#x201c;Serif&#x201d;</code>, and
68       *        <code>&#x201c;SansSerif&#x201d;</code>.
69       *
70       * @param style the style of the font, for instance {@link
71       *        java.awt.Font#BOLD} or {@link java.awt.Font#PLAIN}.
72       *
73       * @param size the size of the font in typographic points, for
74       *        instance 10, 12 or 13. Designers of LookAndFeels should be
75       *        aware that some languages (like Japanese and Chinese) have
76       *        glyphs that are too complex to be legible at small point
77       *        sizes.
78       */
79    public FontUIResource(String name, int style, int size)    public FontUIResource(String name, int style, int size)
80    {    {
81      super(name, style, size);      super(name, style, size);
82    }    }
83  } // class FontUIResource  
84    
85      /**
86       * Constructs a new <code>FontUIResource</code> given
87       * an existing font.
88       *
89       * @param f the font that serves as a template.
90       */
91      public FontUIResource(Font f)
92      {
93        /* This implementation will get rid of many font properties,
94         * such as skewing, values of multiple master design axes,
95         * etc.,  unless they get encoded into the name.  It probably
96         * is not a problem for LookAndFeels because user interfaces
97         * are usually not very advanced with respect to typography.
98         */
99        super(f.getName(), f.getStyle(), f.getSize());
100      }
101    }

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

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