KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > GraphicsConfiguration


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4  
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7  
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9  
10    $Log: GraphicsConfiguration.java,v $
11    Revision 1.3 2004/04/20 15:11:25 bobintetley
12    awt.MenuShortcut implementation
13
14
15  */

16 package swingwt.awt;
17
18 import swingwt.awt.geom.AffineTransform;
19 import swingwt.awt.image.BufferedImage;
20 import swingwt.awt.image.ColorModel;
21 import swingwt.awt.image.VolatileImage;
22
23 /**
24  * Another great abstract class which
25  * is implimented in SwingWT.
26  *
27  * @see swingwt.awt.Graphics
28  * @author Daniel Spiewak
29  */

30 public class GraphicsConfiguration {
31
32     private static BufferCapabilities defaultBufferCaps;
33     private static ImageCapabilities defaultImageCaps;
34
35     protected GraphicsConfiguration() {
36         
37     }
38
39     public GraphicsDevice getDevice() {
40         return null;
41     }
42
43     public BufferedImage createCompatibleImage(int width, int height) {
44         return null;
45     }
46
47     public VolatileImage createCompatibleVolatileImage(int width, int height) {
48         return null;
49     }
50
51     public VolatileImage createCompatibleVolatileImage(int width, int height, ImageCapabilities caps) throws AWTException {
52         // REMIND : check caps
53
return createCompatibleVolatileImage(width, height);
54     }
55
56     public BufferedImage createCompatibleImage(int width, int height, int transparency) {
57         return null;
58     }
59
60     public ColorModel getColorModel() {
61         return null;
62     }
63
64     public ColorModel getColorModel(int transparency) {
65         return null;
66     }
67
68     public AffineTransform getDefaultTransform() {
69         return null;
70     }
71
72     public AffineTransform getNormalizingTransform() {
73         return null;
74     }
75
76     public Rectangle getBounds() {
77         return new Rectangle( 0, 0, Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height );
78     }
79
80     private static class DefaultBufferCapabilities extends BufferCapabilities {
81         public DefaultBufferCapabilities(ImageCapabilities imageCaps) {
82             super(imageCaps, imageCaps, null);
83         }
84     }
85
86     public BufferCapabilities getBufferCapabilities() {
87         if (defaultBufferCaps == null) {
88             defaultBufferCaps =
89                 new DefaultBufferCapabilities(getImageCapabilities());
90         }
91         return defaultBufferCaps;
92     }
93
94     public ImageCapabilities getImageCapabilities() {
95         if (defaultImageCaps == null) {
96             defaultImageCaps = new ImageCapabilities(false);
97         }
98         return defaultImageCaps;
99     }
100 }
101
102 /*
103  *****************************************************
104  * Copyright 2003 Completely Random Solutions *
105  * *
106  * DISCLAMER: *
107  * We are not responsible for any damage *
108  * directly or indirectly caused by the usage *
109  * of this or any other class in assosiation *
110  * with this class. Use at your own risk. *
111  * This or any other class by CRS is not *
112  * certified for use in life support systems, *
113  * the Space Shuttle, in use or developement *
114  * of nuclear reactors, weapons of mass *
115  * destruction, or in interplanitary conflict. *
116  * (Unless otherwise specified) *
117  *****************************************************
118  */
Popular Tags