Path: blob/master/src/java.desktop/share/classes/javax/accessibility/AccessibleValue.java
41153 views
/*1* Copyright (c) 1997, 2017, 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 {@code AccessibleValue} interface should be supported by any object that29* supports a numerical value (e.g., a scroll bar). This interface provides the30* standard mechanism for an assistive technology to determine and set the31* numerical value as well as get the minimum and maximum values. Applications32* can determine if an object supports the {@code AccessibleValue} interface by33* first obtaining its {@code AccessibleContext} (see {@link Accessible}) and34* then calling the {@link AccessibleContext#getAccessibleValue} method. If the35* return value is not {@code null}, the object supports this interface.36*37* @author Peter Korn38* @author Hans Muller39* @author Willie Walker40* @see Accessible41* @see Accessible#getAccessibleContext42* @see AccessibleContext43* @see AccessibleContext#getAccessibleValue44*/45public interface AccessibleValue {4647/**48* Get the value of this object as a {@code Number}. If the value has not49* been set, the return value will be {@code null}.50*51* @return value of the object52* @see #setCurrentAccessibleValue53*/54public Number getCurrentAccessibleValue();5556/**57* Set the value of this object as a {@code Number}.58*59* @param n the number to use for the value60* @return {@code true} if the value was set; else {@code false}61* @see #getCurrentAccessibleValue62*/63public boolean setCurrentAccessibleValue(Number n);6465// /**66// * Get the description of the value of this object.67// *68// * @return description of the value of the object69// */70// public String getAccessibleValueDescription();7172/**73* Get the minimum value of this object as a {@code Number}.74*75* @return minimum value of the object; {@code null} if this object does not76* have a minimum value77* @see #getMaximumAccessibleValue78*/79public Number getMinimumAccessibleValue();8081/**82* Get the maximum value of this object as a {@code Number}.83*84* @return maximum value of the object; {@code null} if this object does not85* have a maximum value86* @see #getMinimumAccessibleValue87*/88public Number getMaximumAccessibleValue();89}909192