51 |
import java.awt.dnd.DragGestureEvent; |
import java.awt.dnd.DragGestureEvent; |
52 |
import java.awt.dnd.peer.DragSourceContextPeer; |
import java.awt.dnd.peer.DragSourceContextPeer; |
53 |
import java.awt.font.FontRenderContext; |
import java.awt.font.FontRenderContext; |
|
import java.awt.font.TextAttribute; |
|
54 |
import java.awt.im.InputMethodHighlight; |
import java.awt.im.InputMethodHighlight; |
55 |
import java.awt.image.BufferedImage; |
import java.awt.image.BufferedImage; |
56 |
import java.awt.image.ColorModel; |
import java.awt.image.ColorModel; |
67 |
import java.util.Iterator; |
import java.util.Iterator; |
68 |
import java.util.LinkedHashMap; |
import java.util.LinkedHashMap; |
69 |
import java.util.Map; |
import java.util.Map; |
|
import java.util.MissingResourceException; |
|
70 |
import java.util.Properties; |
import java.util.Properties; |
71 |
import javax.imageio.spi.IIORegistry; |
import javax.imageio.spi.IIORegistry; |
72 |
|
|
346 |
|
|
347 |
public FontMetrics getFontMetrics (Font font) |
public FontMetrics getFontMetrics (Font font) |
348 |
{ |
{ |
349 |
if (metricsCache.containsKey(font)) |
synchronized (metricsCache) |
350 |
return (FontMetrics) metricsCache.get(font); |
{ |
351 |
else |
if (metricsCache.containsKey(font)) |
352 |
|
return (FontMetrics) metricsCache.get(font); |
353 |
|
} |
354 |
|
|
355 |
|
FontMetrics m = new GdkFontMetrics (font); |
356 |
|
synchronized (metricsCache) |
357 |
{ |
{ |
|
FontMetrics m; |
|
|
m = new GdkFontMetrics (font); |
|
358 |
metricsCache.put(font, m); |
metricsCache.put(font, m); |
359 |
return m; |
} |
360 |
} |
return m; |
361 |
} |
} |
362 |
|
|
363 |
public Image getImage (String filename) |
public Image getImage (String filename) |
633 |
throw new Error("not implemented"); |
throw new Error("not implemented"); |
634 |
} |
} |
635 |
|
|
636 |
|
public Rectangle getBounds() |
637 |
|
{ |
638 |
|
int[] dims = new int[2]; |
639 |
|
getScreenSizeDimensions(dims); |
640 |
|
return new Rectangle(0, 0, dims[0], dims[1]); |
641 |
|
} |
642 |
|
|
643 |
// ClasspathToolkit methods |
// ClasspathToolkit methods |
644 |
|
|
645 |
public GraphicsEnvironment getLocalGraphicsEnvironment() |
public GraphicsEnvironment getLocalGraphicsEnvironment() |
646 |
{ |
{ |
647 |
return new GdkGraphicsEnvironment(); |
return new GdkGraphicsEnvironment(this); |
648 |
} |
} |
649 |
|
|
650 |
public Font createFont(int format, InputStream stream) |
public Font createFont(int format, InputStream stream) |