Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/accessibility/AccessibleAttributeSequence.java
38829 views
/*1* Copyright (c) 2003, 2005, 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*/24package javax.accessibility;2526import javax.swing.text.AttributeSet;272829/**30* <P>The AccessibleAttributeSequence provides information about31* a contiguous sequence of text attributes32*33* @see Accessible34* @see Accessible#getAccessibleContext35* @see AccessibleContext36* @see AccessibleContext#getAccessibleText37* @see AccessibleTextSequence38*39* @author Lynn Monsanto40*/4142/**43* This class collects together the span of text that share the same44* contiguous set of attributes, along with that set of attributes. It45* is used by implementors of the class <code>AccessibleContext</code> in46* order to generate <code>ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED</code> events.47*48* @see javax.accessibility.AccessibleContext49* @see javax.accessibility.AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED50*/51public class AccessibleAttributeSequence {52/** The start index of the text sequence */53public int startIndex;5455/** The end index of the text sequence */56public int endIndex;5758/** The text attributes */59public AttributeSet attributes;6061/**62* Constructs an <code>AccessibleAttributeSequence</code> with the given63* parameters.64*65* @param start the beginning index of the span of text66* @param end the ending index of the span of text67* @param attr the <code>AttributeSet</code> shared by this text span68*69* @since 1.670*/71public AccessibleAttributeSequence(int start, int end, AttributeSet attr) {72startIndex = start;73endIndex = end;74attributes = attr;75}7677};787980