/[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.24 by mkoch, Mon Feb 21 16:11:48 2005 UTC revision 1.25 by mkoch, Tue Mar 8 08:15:34 2005 UTC
# Line 209  private static final long serialVersionU Line 209  private static final long serialVersionU
209    * The style should be one of BOLD, ITALIC, or BOLDITALIC.  The default    * The style should be one of BOLD, ITALIC, or BOLDITALIC.  The default
210    * style if none is specified is PLAIN.  The default size if none    * style if none is specified is PLAIN.  The default size if none
211    * is specified is 12.    * is specified is 12.
212      *
213      * @param fontspec  a string specifying the required font (<code>null</code>
214      *                  permitted, interpreted as 'Dialog-PLAIN-12').
215      *
216      * @return A font.
217    */    */
218    public static Font decode (String fontspec)    public static Font decode (String fontspec)
219  {  {
220      if (fontspec == null)
221        fontspec = "Dialog-PLAIN-12";
222    String name = null;    String name = null;
223    int style = PLAIN;    int style = PLAIN;
224    int size = 12;    int size = 12;
225    
226    StringTokenizer st = new StringTokenizer(fontspec, "-");    StringTokenizer st = new StringTokenizer(fontspec, "- ");
227    while (st.hasMoreTokens())    while (st.hasMoreTokens())
228      {      {
229        String token = st.nextToken();        String token = st.nextToken();

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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