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) |
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) |