1 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 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 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 | Popular Tags |