0N/A/*
2362N/A * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage javax.accessibility;
0N/A
0N/A/**
0N/A * This AccessibleSelection interface
0N/A * provides the standard mechanism for an assistive technology to determine
0N/A * what the current selected children are, as well as modify the selection set.
0N/A * Any object that has children that can be selected should support
0N/A * the AccessibleSelection interface. Applications can determine if an object supports the
0N/A * AccessibleSelection interface by first obtaining its AccessibleContext (see
0N/A * {@link Accessible}) and then calling the
0N/A * {@link AccessibleContext#getAccessibleSelection} method.
0N/A * If the return value is not null, the object supports this interface.
0N/A *
0N/A * @see Accessible
0N/A * @see Accessible#getAccessibleContext
0N/A * @see AccessibleContext
0N/A * @see AccessibleContext#getAccessibleSelection
0N/A *
0N/A * @author Peter Korn
0N/A * @author Hans Muller
0N/A * @author Willie Walker
0N/A */
0N/Apublic interface AccessibleSelection {
0N/A
0N/A /**
0N/A * Returns the number of Accessible children currently selected.
0N/A * If no children are selected, the return value will be 0.
0N/A *
0N/A * @return the number of items currently selected.
0N/A */
0N/A public int getAccessibleSelectionCount();
0N/A
0N/A /**
0N/A * Returns an Accessible representing the specified selected child
0N/A * of the object. If there isn't a selection, or there are
0N/A * fewer children selected than the integer passed in, the return
0N/A * value will be null.
0N/A * <p>Note that the index represents the i-th selected child, which
0N/A * is different from the i-th child.
0N/A *
0N/A * @param i the zero-based index of selected children
0N/A * @return the i-th selected child
0N/A * @see #getAccessibleSelectionCount
0N/A */
0N/A public Accessible getAccessibleSelection(int i);
0N/A
0N/A /**
0N/A * Determines if the current child of this object is selected.
0N/A *
0N/A * @return true if the current child of this object is selected; else false.
0N/A * @param i the zero-based index of the child in this Accessible object.
0N/A * @see AccessibleContext#getAccessibleChild
0N/A */
0N/A public boolean isAccessibleChildSelected(int i);
0N/A
0N/A /**
0N/A * Adds the specified Accessible child of the object to the object's
0N/A * selection. If the object supports multiple selections,
0N/A * the specified child is added to any existing selection, otherwise
0N/A * it replaces any existing selection in the object. If the
0N/A * specified child is already selected, this method has no effect.
0N/A *
0N/A * @param i the zero-based index of the child
0N/A * @see AccessibleContext#getAccessibleChild
0N/A */
0N/A public void addAccessibleSelection(int i);
0N/A
0N/A /**
0N/A * Removes the specified child of the object from the object's
0N/A * selection. If the specified item isn't currently selected, this
0N/A * method has no effect.
0N/A *
0N/A * @param i the zero-based index of the child
0N/A * @see AccessibleContext#getAccessibleChild
0N/A */
0N/A public void removeAccessibleSelection(int i);
0N/A
0N/A /**
0N/A * Clears the selection in the object, so that no children in the
0N/A * object are selected.
0N/A */
0N/A public void clearAccessibleSelection();
0N/A
0N/A /**
0N/A * Causes every child of the object to be selected
0N/A * if the object supports multiple selections.
0N/A */
0N/A public void selectAllAccessibleSelection();
0N/A}