0N/A/*
2362N/A * Copyright (c) 2000, 2006, 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/Aimport java.util.*;
0N/Aimport java.awt.*;
0N/Aimport javax.swing.text.*;
0N/A
0N/A/**
0N/A * <P>The AccessibleEditableText interface should be implemented by all
0N/A * classes that present editable textual information on the display.
0N/A * Along with the AccessibleText interface, this interface provides
0N/A * the standard mechanism for an assistive technology to access
0N/A * that text via its content, attributes, and spatial location.
0N/A * Applications can determine if an object supports the AccessibleEditableText
0N/A * interface by first obtaining its AccessibleContext (see {@link Accessible})
0N/A * and then calling the {@link AccessibleContext#getAccessibleEditableText}
0N/A * method of AccessibleContext. If the return value is not null, the object
0N/A * supports this interface.
0N/A *
0N/A * @see Accessible
0N/A * @see Accessible#getAccessibleContext
0N/A * @see AccessibleContext
0N/A * @see AccessibleContext#getAccessibleText
0N/A * @see AccessibleContext#getAccessibleEditableText
0N/A *
0N/A * @author Lynn Monsanto
0N/A * @since 1.4
0N/A */
0N/A
0N/Apublic interface AccessibleEditableText extends AccessibleText {
0N/A
0N/A /**
0N/A * Sets the text contents to the specified string.
0N/A *
0N/A * @param s the string to set the text contents
0N/A */
0N/A public void setTextContents(String s);
0N/A
0N/A /**
0N/A * Inserts the specified string at the given index/
0N/A *
0N/A * @param index the index in the text where the string will
0N/A * be inserted
0N/A * @param s the string to insert in the text
0N/A */
0N/A public void insertTextAtIndex(int index, String s);
0N/A
0N/A /**
0N/A * Returns the text string between two indices.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A * @return the text string between the indices
0N/A */
0N/A public String getTextRange(int startIndex, int endIndex);
0N/A
0N/A /**
0N/A * Deletes the text between two indices
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A */
0N/A public void delete(int startIndex, int endIndex);
0N/A
0N/A /**
0N/A * Cuts the text between two indices into the system clipboard.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A */
0N/A public void cut(int startIndex, int endIndex);
0N/A
0N/A /**
0N/A * Pastes the text from the system clipboard into the text
0N/A * starting at the specified index.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A */
0N/A public void paste(int startIndex);
0N/A
0N/A /**
0N/A * Replaces the text between two indices with the specified
0N/A * string.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A * @param s the string to replace the text between two indices
0N/A */
0N/A public void replaceText(int startIndex, int endIndex, String s);
0N/A
0N/A /**
0N/A * Selects the text between two indices.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A */
0N/A public void selectText(int startIndex, int endIndex);
0N/A
0N/A /**
0N/A * Sets attributes for the text between two indices.
0N/A *
0N/A * @param startIndex the starting index in the text
0N/A * @param endIndex the ending index in the text
0N/A * @param as the attribute set
0N/A * @see AttributeSet
0N/A */
0N/A public void setAttributes(int startIndex, int endIndex, AttributeSet as);
0N/A
0N/A}