Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/accessibility/AccessibleValue.java
38829 views
/*1* Copyright (c) 1997, 2013, 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 AccessibleValue interface should be supported by any object29* that supports a numerical value (e.g., a scroll bar). This interface30* provides the standard mechanism for an assistive technology to determine31* and set the numerical value as well as get the minimum and maximum values.32* Applications can determine33* if an object supports the AccessibleValue interface by first34* obtaining its AccessibleContext (see35* {@link Accessible}) and then calling the36* {@link AccessibleContext#getAccessibleValue} method.37* If the return value is not null, the object supports this interface.38*39* @see Accessible40* @see Accessible#getAccessibleContext41* @see AccessibleContext42* @see AccessibleContext#getAccessibleValue43*44* @author Peter Korn45* @author Hans Muller46* @author Willie Walker47*/48public interface AccessibleValue {4950/**51* Get the value of this object as a Number. If the value has not been52* set, the return value will be null.53*54* @return value of the object55* @see #setCurrentAccessibleValue56*/57public Number getCurrentAccessibleValue();5859/**60* Set the value of this object as a Number.61*62* @param n the number to use for the value63* @return True if the value was set; else False64* @see #getCurrentAccessibleValue65*/66public boolean setCurrentAccessibleValue(Number n);6768// /**69// * Get the description of the value of this object.70// *71// * @return description of the value of the object72// */73// public String getAccessibleValueDescription();7475/**76* Get the minimum value of this object as a Number.77*78* @return Minimum value of the object; null if this object does not79* have a minimum value80* @see #getMaximumAccessibleValue81*/82public Number getMinimumAccessibleValue();8384/**85* Get the maximum value of this object as a Number.86*87* @return Maximum value of the object; null if this object does not88* have a maximum value89* @see #getMinimumAccessibleValue90*/91public Number getMaximumAccessibleValue();92}939495