/* * @(#)ImageCapabilities.java 1.6 03/12/19 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.awt; /** * Capabilities and properties of images. * @author Michael Martak * @since 1.4 */ public class ImageCapabilities implements Cloneable { private boolean accelerated = false; /** * Creates a new object for specifying image capabilities. * @param accelerated whether or not an accelerated image is desired */ public ImageCapabilities(boolean accelerated) { this.accelerated = accelerated; } /** * Returns true if the object whose capabilities are * encapsulated in this ImageCapabilities can be or is * accelerated. * @return whether or not an image can be, or is, accelerated. There are * various platform-specific ways to accelerate an image, including * pixmaps, VRAM, AGP. This is the general acceleration method (as * opposed to residing in system memory). */ public boolean isAccelerated() { return accelerated; } /** * Returns true if the VolatileImage * described by this ImageCapabilities can lose * its surfaces. * @return whether or not a volatile image is subject to losing its surfaces * at the whim of the operating system. */ public boolean isTrueVolatile() { return false; } /** * @return a copy of this ImageCapabilities object. */ public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { // Since we implement Cloneable, this should never happen throw new InternalError(); } } }