26 27 import javax.swing.text.AttributeSet; 28 29 30 /** 31 * <P>The AccessibleAttributeSequence provides information about 32 * a contiguous sequence of text attributes 33 * 34 * @see Accessible 35 * @see Accessible#getAccessibleContext 36 * @see AccessibleContext 37 * @see AccessibleContext#getAccessibleText 38 * @see AccessibleTextSequence 39 * 40 * @author Lynn Monsanto 41 */ 42 43 /** 44 * This class collects together the span of text that share the same 45 * contiguous set of attributes, along with that set of attributes. It 46 * is used by implementors of the class <code>AccessibleContext</code> in 47 * order to generate <code>ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED</code> events. 48 * 49 * @see javax.accessibility.AccessibleContext 50 * @see javax.accessibility.AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED 51 */ 52 public class AccessibleAttributeSequence { 53 /** The start index of the text sequence */ 54 public int startIndex; 55 56 /** The end index of the text sequence */ 57 public int endIndex; 58 59 /** The text attributes */ 60 public AttributeSet attributes; 61 62 /** 63 * Constructs an <code>AccessibleAttributeSequence</code> with the given 64 * parameters. 65 * 66 * @param start the beginning index of the span of text 67 * @param end the ending index of the span of text 68 * @param attr the <code>AttributeSet</code> shared by this text span 69 * 70 * @since 1.6 71 */ 72 public AccessibleAttributeSequence(int start, int end, AttributeSet attr) { 73 startIndex = start; 74 endIndex = end; 75 attributes = attr; 76 } 77 78 }; | 26 27 import javax.swing.text.AttributeSet; 28 29 30 /** 31 * <P>The AccessibleAttributeSequence provides information about 32 * a contiguous sequence of text attributes 33 * 34 * @see Accessible 35 * @see Accessible#getAccessibleContext 36 * @see AccessibleContext 37 * @see AccessibleContext#getAccessibleText 38 * @see AccessibleTextSequence 39 * 40 * @author Lynn Monsanto 41 */ 42 43 /** 44 * This class collects together the span of text that share the same 45 * contiguous set of attributes, along with that set of attributes. It 46 * is used by implementors of the class {@code AccessibleContext} in 47 * order to generate {@code ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED} events. 48 * 49 * @see javax.accessibility.AccessibleContext 50 * @see javax.accessibility.AccessibleContext#ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED 51 */ 52 public class AccessibleAttributeSequence { 53 /** The start index of the text sequence */ 54 public int startIndex; 55 56 /** The end index of the text sequence */ 57 public int endIndex; 58 59 /** The text attributes */ 60 public AttributeSet attributes; 61 62 /** 63 * Constructs an {@code AccessibleAttributeSequence} with the given 64 * parameters. 65 * 66 * @param start the beginning index of the span of text 67 * @param end the ending index of the span of text 68 * @param attr the {@code AttributeSet} shared by this text span 69 * 70 * @since 1.6 71 */ 72 public AccessibleAttributeSequence(int start, int end, AttributeSet attr) { 73 startIndex = start; 74 endIndex = end; 75 attributes = attr; 76 } 77 78 }; |