1/*
2 * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26package javax.accessibility;
27
28/**
29 * The {@code AccessibleIcon} interface should be supported by any object that
30 * has an associated icon (e.g., buttons). This interface provides the standard
31 * mechanism for an assistive technology to get descriptive information about
32 * icons. Applications can determine if an object supports the
33 * {@code AccessibleIcon} interface by first obtaining its
34 * {@code AccessibleContext} (see {@link Accessible}) and then calling the
35 * {@link AccessibleContext#getAccessibleIcon} method. If the return value is
36 * not {@code null}, the object supports this interface.
37 *
38 * @author Lynn Monsanto
39 * @see Accessible
40 * @see AccessibleContext
41 * @since 1.3
42 */
43public interface AccessibleIcon {
44
45    /**
46     * Gets the description of the icon. This is meant to be a brief textual
47     * description of the object. For example, it might be presented to a blind
48     * user to give an indication of the purpose of the icon.
49     *
50     * @return the description of the icon
51     */
52    public String getAccessibleIconDescription();
53
54    /**
55     * Sets the description of the icon. This is meant to be a brief textual
56     * description of the object. For example, it might be presented to a blind
57     * user to give an indication of the purpose of the icon.
58     *
59     * @param  description the description of the icon
60     */
61    public void setAccessibleIconDescription(String description);
62
63    /**
64     * Gets the width of the icon.
65     *
66     * @return the width of the icon
67     */
68    public int getAccessibleIconWidth();
69
70    /**
71     * Gets the height of the icon.
72     *
73     * @return the height of the icon
74     */
75    public int getAccessibleIconHeight();
76}
77