KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > event > TableModelEvent


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: TableModelEvent.java,v $
11    Revision 1.4 2003/12/14 09:13:38 bobintetley
12    Added CVS log to source headers
13
14 */

15
16 package swingwtx.swing.event;
17
18 import swingwtx.swing.table.TableModel;
19
20
21 public class TableModelEvent extends java.util.EventObject JavaDoc
22 {
23     public static final int INSERT = 1;
24     public static final int UPDATE = 0;
25     public static final int DELETE = -1;
26     public static final int HEADER_ROW = -1;
27     public static final int ALL_COLUMNS = -1;
28
29     protected int type;
30     protected int firstRow;
31     protected int lastRow;
32     protected int column;
33
34     public TableModelEvent(TableModel source) {
35     this(source, 0, Integer.MAX_VALUE, ALL_COLUMNS, UPDATE);
36     }
37     public TableModelEvent(TableModel source, int row) {
38     this(source, row, row, ALL_COLUMNS, UPDATE);
39     }
40     public TableModelEvent(TableModel source, int firstRow, int lastRow) {
41     this(source, firstRow, lastRow, ALL_COLUMNS, UPDATE);
42     }
43     public TableModelEvent(TableModel source, int firstRow, int lastRow, int column) {
44     this(source, firstRow, lastRow, column, UPDATE);
45     }
46     public TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type) {
47     super(source);
48     this.firstRow = firstRow;
49     this.lastRow = lastRow;
50     this.column = column;
51     this.type = type;
52     }
53     public int getFirstRow() { return firstRow; };
54     public int getLastRow() { return lastRow; };
55     public int getColumn() { return column; };
56     public int getType() { return type; }
57 }
58
Popular Tags