/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkToolkit.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkToolkit.java

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

revision 1.64 by mkoch, Tue Jan 18 09:43:45 2005 UTC revision 1.65 by graydon, Sat Feb 12 09:37:31 2005 UTC
# Line 348  public class GtkToolkit extends gnu.java Line 348  public class GtkToolkit extends gnu.java
348    
349    public FontMetrics getFontMetrics (Font font)    public FontMetrics getFontMetrics (Font font)
350    {    {
351      if (metricsCache.containsKey(font))      synchronized (metricsCache)
352        return (FontMetrics) metricsCache.get(font);        {
353      else          if (metricsCache.containsKey(font))
354              return (FontMetrics) metricsCache.get(font);
355          }
356    
357        FontMetrics m = new GdkFontMetrics (font);
358        synchronized (metricsCache)
359        {        {
         FontMetrics m;  
         m = new GdkFontMetrics (font);  
360          metricsCache.put(font, m);          metricsCache.put(font, m);
361          return m;        }
362        }          return m;
363    }    }
364    
365    public Image getImage (String filename)    public Image getImage (String filename)
# Line 632  public class GtkToolkit extends gnu.java Line 635  public class GtkToolkit extends gnu.java
635      throw new Error("not implemented");      throw new Error("not implemented");
636    }    }
637    
638      public Rectangle getBounds()
639      {
640        int[] dims = new int[2];
641        getScreenSizeDimensions(dims);
642        return new Rectangle(0, 0, dims[0], dims[1]);
643      }
644      
645    // ClasspathToolkit methods    // ClasspathToolkit methods
646    
647    public GraphicsEnvironment getLocalGraphicsEnvironment()    public GraphicsEnvironment getLocalGraphicsEnvironment()
648    {    {
649      return new GdkGraphicsEnvironment();      return new GdkGraphicsEnvironment(this);
650    }    }
651    
652    public Font createFont(int format, InputStream stream)    public Font createFont(int format, InputStream stream)

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

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