package java.awt;
+import gnu.classpath.NotImplementedException;
+
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
*/
public abstract class GraphicsConfiguration
{
+
+ /** The cached image capabilities. */
+ private ImageCapabilities imageCapabilities;
+
+ /** The cached buffer capabilities. */
+ private BufferCapabilities bufferCapabilities;
+
/**
* The default constructor.
*
* with the given transparency. Because the buffer is volatile, it
* can be optimized by native graphics accelerators.
*
- * @param w the width of the buffer
- * @param h the height of the buffer
+ * @param width the width of the buffer
+ * @param height the height of the buffer
* @param transparency the transparency value for the buffer
* @return the buffered image, or null if none is supported
- * @throws AWTException if the capabilities cannot be met
* @since 1.5
*/
public abstract VolatileImage createCompatibleVolatileImage(int width,
*/
public BufferCapabilities getBufferCapabilities()
{
- throw new Error("not implemented");
+ if (imageCapabilities == null)
+ getImageCapabilities();
+
+ if (bufferCapabilities == null)
+ bufferCapabilities = new BufferCapabilities(imageCapabilities,
+ imageCapabilities, null);
+ return bufferCapabilities;
}
/**
*/
public ImageCapabilities getImageCapabilities()
{
- throw new Error("not implemented");
+ if (imageCapabilities == null)
+ imageCapabilities = new ImageCapabilities(false);
+ return imageCapabilities;
}
} // class GraphicsConfiguration