J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 1999-2006 Sun Microsystems, Inc. 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. Sun designates this |
| 8 | * particular file as subject to the "Classpath" exception as provided |
| 9 | * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
| 22 | * CA 95054 USA or visit www.sun.com if you need additional information or |
| 23 | * have any questions. |
| 24 | */ |
| 25 | |
| 26 | package javax.accessibility; |
| 27 | |
| 28 | /** |
| 29 | * The AccessibleTableModelChange interface describes a change to |
| 30 | * the table model. The attributes of the model change can be |
| 31 | * obtained by the following methods: |
| 32 | * <ul> |
| 33 | * <li> public int getType() |
| 34 | * <li> public int getFirstRow(); |
| 35 | * <li> public int getLastRow(); |
| 36 | * <li> public int getFirstColumn(); |
| 37 | * <li> public int getLastColumn(); |
| 38 | * </ul> |
| 39 | * The model change type returned by getType() will be one of: |
| 40 | * <ul> |
| 41 | * <li> INSERT - one or more rows and/or columns have been inserted |
| 42 | * <li> UPDATE - some of the table data has changed |
| 43 | * <li> 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 |
| 46 | * four methods which specify ranges of rows and columns |
| 47 | * |
| 48 | * @see Accessible |
| 49 | * @see Accessible#getAccessibleContext |
| 50 | * @see AccessibleContext |
| 51 | * @see AccessibleContext#getAccessibleTable |
| 52 | * |
| 53 | * @author Lynn Monsanto |
| 54 | * @since 1.3 |
| 55 | */ |
| 56 | public interface AccessibleTableModelChange { |
| 57 | |
| 58 | /** |
| 59 | * Identifies the insertion of new rows and/or columns. |
| 60 | */ |
| 61 | public static final int INSERT = 1; |
| 62 | |
| 63 | /** |
| 64 | * Identifies a change to existing data. |
| 65 | */ |
| 66 | public static final int UPDATE = 0; |
| 67 | |
| 68 | /** |
| 69 | * Identifies the deletion of rows and/or columns. |
| 70 | */ |
| 71 | public static final int DELETE = -1; |
| 72 | |
| 73 | /** |
| 74 | * Returns the type of event |
| 75 | * |
| 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 | public int getFirstRow(); |
| 86 | |
| 87 | /** |
| 88 | * Returns the last row that changed. |
| 89 | */ |
| 90 | public int getLastRow(); |
| 91 | |
| 92 | /** |
| 93 | * Returns the first column that changed. |
| 94 | */ |
| 95 | public int getFirstColumn(); |
| 96 | |
| 97 | /** |
| 98 | * Returns the last column that changed. |
| 99 | */ |
| 100 | public int getLastColumn(); |
| 101 | } |