Path: blob/master/src/java.desktop/share/classes/javax/accessibility/AccessibleTextSequence.java
41153 views
/*1* Copyright (c) 2003, 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* This class collects together key details of a span of text. It is used by29* implementors of the class {@code AccessibleExtendedText} in order to return30* the requested triplet of a {@code String}, and the start and end31* indicies/offsets into a larger body of text that the {@code String} comes32* from.33*34* @see AccessibleExtendedText35*/36public class AccessibleTextSequence {3738/**39* The start index of the text sequence.40*/41public int startIndex;4243/**44* The end index of the text sequence.45*/46public int endIndex;4748/**49* The text.50*/51public String text;5253/**54* Constructs an {@code AccessibleTextSequence} with the given parameters.55*56* @param start the beginning index of the span of text57* @param end the ending index of the span of text58* @param txt the {@code String} shared by this text span59* @since 1.660*/61public AccessibleTextSequence(int start, int end, String txt) {62startIndex = start;63endIndex = end;64text = txt;65}66};676869