1/*
2 *  Licensed to the Apache Software Foundation (ASF) under one or more
3 *  contributor license agreements.  See the NOTICE file distributed with
4 *  this work for additional information regarding copyright ownership.
5 *  The ASF licenses this file to You under the Apache License, Version 2.0
6 *  (the "License"); you may not use this file except in compliance with
7 *  the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 */
17/**
18 * @author Alexey A. Petrenko
19 * @version $Revision$
20 */
21
22package java.awt;
23
24/**
25 * The ImageCapabilities class gives information about an image's capabilities.
26 *
27 * @since Android 1.0
28 */
29public class ImageCapabilities implements Cloneable {
30
31    /**
32     * The accelerated.
33     */
34    private final boolean accelerated;
35
36    /**
37     * Instantiates a new ImageCapabilities with the specified acceleration flag
38     * which indicates whether acceleration is desired or not.
39     *
40     * @param accelerated
41     *            the accelerated flag.
42     */
43    public ImageCapabilities(boolean accelerated) {
44        this.accelerated = accelerated;
45    }
46
47    /**
48     * Returns a copy of this ImageCapabilities object.
49     *
50     * @return the copy of this ImageCapabilities object.
51     */
52    @Override
53    public Object clone() {
54        return new ImageCapabilities(accelerated);
55    }
56
57    /**
58     * Returns true if the Image of this ImageCapabilities is or can be
59     * accelerated.
60     *
61     * @return true, if the Image of this ImageCapabilities is or can be
62     *         accelerated, false otherwise.
63     */
64    public boolean isAccelerated() {
65        return accelerated;
66    }
67
68    /**
69     * Returns true if this ImageCapabilities applies to the VolatileImage which
70     * can lose its surfaces.
71     *
72     * @return true if this ImageCapabilities applies to the VolatileImage which
73     *         can lose its surfaces, false otherwise.
74     */
75    public boolean isTrueVolatile() {
76        return true;
77    }
78}
79