1 7 8 package javax.swing.event; 9 10 import java.util.EventObject ; 11 import javax.swing.table.*; 12 13 51 public class TableModelEvent extends java.util.EventObject 52 { 53 54 public static final int INSERT = 1; 55 56 public static final int UPDATE = 0; 57 58 public static final int DELETE = -1; 59 60 61 public static final int HEADER_ROW = -1; 62 63 64 public static final int ALL_COLUMNS = -1; 65 66 70 protected int type; 71 protected int firstRow; 72 protected int lastRow; 73 protected int column; 74 75 79 88 public TableModelEvent(TableModel source) { 89 this(source, 0, Integer.MAX_VALUE, ALL_COLUMNS, UPDATE); 91 } 92 93 103 public TableModelEvent(TableModel source, int row) { 104 this(source, row, row, ALL_COLUMNS, UPDATE); 105 } 106 107 110 public TableModelEvent(TableModel source, int firstRow, int lastRow) { 111 this(source, firstRow, lastRow, ALL_COLUMNS, UPDATE); 112 } 113 114 118 public TableModelEvent(TableModel source, int firstRow, int lastRow, int column) { 119 this(source, firstRow, lastRow, column, UPDATE); 120 } 121 122 130 public TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type) { 131 super(source); 132 this.firstRow = firstRow; 133 this.lastRow = lastRow; 134 this.column = column; 135 this.type = type; 136 } 137 138 142 145 public int getFirstRow() { return firstRow; }; 146 147 148 public int getLastRow() { return lastRow; }; 149 150 155 public int getColumn() { return column; }; 156 157 160 public int getType() { return type; } 161 } 162 | Popular Tags |