Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/accessibility/AccessibleIcon.java
38829 views
/*1* Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.accessibility;2627/**28* The AccessibleIcon interface should be supported by any object29* that has an associated icon (e.g., buttons). This interface30* provides the standard mechanism for an assistive technology31* to get descriptive information about icons.32* Applications can determine33* if an object supports the AccessibleIcon interface by first34* obtaining its AccessibleContext (see35* {@link Accessible}) and then calling the36* {@link AccessibleContext#getAccessibleIcon} method.37* If the return value is not null, the object supports this interface.38*39* @see Accessible40* @see AccessibleContext41*42* @author Lynn Monsanto43* @since 1.344*/45public interface AccessibleIcon {4647/**48* Gets the description of the icon. This is meant to be a brief49* textual description of the object. For example, it might be50* presented to a blind user to give an indication of the purpose51* of the icon.52*53* @return the description of the icon54*/55public String getAccessibleIconDescription();5657/**58* Sets the description of the icon. This is meant to be a brief59* textual description of the object. For example, it might be60* presented to a blind user to give an indication of the purpose61* of the icon.62*63* @param description the description of the icon64*/65public void setAccessibleIconDescription(String description);6667/**68* Gets the width of the icon69*70* @return the width of the icon.71*/72public int getAccessibleIconWidth();7374/**75* Gets the height of the icon76*77* @return the height of the icon.78*/79public int getAccessibleIconHeight();8081}828384