1/* 2 * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26package javax.accessibility; 27 28/** 29 * The {@code AccessibleTableModelChange} interface describes a change to the 30 * table model. The attributes of the model change can be obtained by the 31 * following methods: 32 * <ul> 33 * <li>{@code public int getType();} 34 * <li>{@code public int getFirstRow();} 35 * <li>{@code public int getLastRow();} 36 * <li>{@code public int getFirstColumn();} 37 * <li>{@code public int getLastColumn();} 38 * </ul> 39 * The model change type returned by getType() will be one of: 40 * <ul> 41 * <li>{@code INSERT} - one or more rows and/or columns have been inserted 42 * <li>{@code UPDATE} - some of the table data has changed 43 * <li>{@code DELETE} - one or more rows and/or columns have been deleted 44 * </ul> 45 * The affected area of the table can be determined by the other four methods 46 * which specify ranges of rows and columns 47 * 48 * @author Lynn Monsanto 49 * @see Accessible 50 * @see Accessible#getAccessibleContext 51 * @see AccessibleContext 52 * @see AccessibleContext#getAccessibleTable 53 * @since 1.3 54 */ 55public interface AccessibleTableModelChange { 56 57 /** 58 * Identifies the insertion of new rows and/or columns. 59 */ 60 public static final int INSERT = 1; 61 62 /** 63 * Identifies a change to existing data. 64 */ 65 public static final int UPDATE = 0; 66 67 /** 68 * Identifies the deletion of rows and/or columns. 69 */ 70 public static final int DELETE = -1; 71 72 /** 73 * Returns the type of event. 74 * 75 * @return the type of event 76 * @see #INSERT 77 * @see #UPDATE 78 * @see #DELETE 79 */ 80 public int getType(); 81 82 /** 83 * Returns the first row that changed. 84 * 85 * @return the first row that changed 86 */ 87 public int getFirstRow(); 88 89 /** 90 * Returns the last row that changed. 91 * 92 * @return the last row that changed 93 */ 94 public int getLastRow(); 95 96 /** 97 * Returns the first column that changed. 98 * 99 * @return the first column that changed 100 */ 101 public int getFirstColumn(); 102 103 /** 104 * Returns the last column that changed. 105 * 106 * @return the last column that changed 107 */ 108 public int getLastColumn(); 109} 110