50 |
|
|
51 |
public class GdkGraphicsEnvironment extends GraphicsEnvironment |
public class GdkGraphicsEnvironment extends GraphicsEnvironment |
52 |
{ |
{ |
53 |
public GdkGraphicsEnvironment () |
GtkToolkit gtkToolkit; |
54 |
|
|
55 |
|
public GtkToolkit getToolkit() |
56 |
|
{ |
57 |
|
return gtkToolkit; |
58 |
|
} |
59 |
|
|
60 |
|
public GdkGraphicsEnvironment (GtkToolkit tk) |
61 |
{ |
{ |
62 |
super(); |
super(); |
63 |
|
gtkToolkit = tk; |
64 |
} |
} |
65 |
|
|
66 |
public GraphicsDevice[] getScreenDevices () |
public GraphicsDevice[] getScreenDevices () |
67 |
{ |
{ |
68 |
throw new java.lang.UnsupportedOperationException (); |
// FIXME: Support multiple screens, since GDK can. |
69 |
|
return new GraphicsDevice[] { new GdkScreenGraphicsDevice (this) }; |
70 |
} |
} |
71 |
|
|
72 |
public GraphicsDevice getDefaultScreenDevice () |
public GraphicsDevice getDefaultScreenDevice () |
74 |
if (GraphicsEnvironment.isHeadless ()) |
if (GraphicsEnvironment.isHeadless ()) |
75 |
throw new HeadlessException (); |
throw new HeadlessException (); |
76 |
|
|
77 |
return new GdkScreenGraphicsDevice (); |
return new GdkScreenGraphicsDevice (this); |
78 |
} |
} |
79 |
|
|
80 |
public Graphics2D createGraphics (BufferedImage image) |
public Graphics2D createGraphics (BufferedImage image) |