Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/accessibility/AccessibleAction.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 AccessibleAction interface should be supported by any object29* that can perform one or more actions. This interface30* provides the standard mechanism for an assistive technology to determine31* what those actions are as well as tell the object to perform them.32* Any object that can be manipulated should support this33* interface. Applications can determine if an object supports the34* AccessibleAction interface by first obtaining its AccessibleContext (see35* {@link Accessible}) and then calling the {@link AccessibleContext#getAccessibleAction}36* method. If the return value is not null, the object supports this interface.37*38* @see Accessible39* @see Accessible#getAccessibleContext40* @see AccessibleContext41* @see AccessibleContext#getAccessibleAction42*43* @author Peter Korn44* @author Hans Muller45* @author Willie Walker46* @author Lynn Monsanto47*/48public interface AccessibleAction {4950/**51* An action which causes a tree node to52* collapse if expanded and expand if collapsed.53* @since 1.554*/55public static final String TOGGLE_EXPAND =56new String ("toggleexpand");5758/**59* An action which increments a value.60* @since 1.561*/62public static final String INCREMENT =63new String ("increment");646566/**67* An action which decrements a value.68* @since 1.569*/70public static final String DECREMENT =71new String ("decrement");7273/**74* An action which causes a component to execute its default action.75* @since 1.676*/77public static final String CLICK = new String("click");7879/**80* An action which causes a popup to become visible if it is hidden and81* hidden if it is visible.82* @since 1.683*/84public static final String TOGGLE_POPUP = new String("toggle popup");8586/**87* Returns the number of accessible actions available in this object88* If there are more than one, the first one is considered the "default"89* action of the object.90*91* @return the zero-based number of Actions in this object92*/93public int getAccessibleActionCount();9495/**96* Returns a description of the specified action of the object.97*98* @param i zero-based index of the actions99* @return a String description of the action100* @see #getAccessibleActionCount101*/102public String getAccessibleActionDescription(int i);103104/**105* Performs the specified Action on the object106*107* @param i zero-based index of actions108* @return true if the action was performed; otherwise false.109* @see #getAccessibleActionCount110*/111public boolean doAccessibleAction(int i);112}113114115