public class TableModelEvent extends EventObject
TableModel.TableModelListener,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_COLUMNS
A column index representing all columns.
|
protected int |
column
The column in the table model that the event relates to.
|
static int |
DELETE
An event type indicating that one or more rows have been deleted from the
model.
|
protected int |
firstRow
The first row in the table model that the event relates to.
|
static int |
HEADER_ROW
A row index representing the header row.
|
static int |
INSERT
An event type indicating that one or more rows have been inserted into the
model.
|
protected int |
lastRow
The last row in the table model that the event relates to.
|
protected int |
type
|
static int |
UPDATE
An event type indicating that data has been updated in the model.
|
source| Constructor and Description |
|---|
TableModelEvent(TableModel source)
Creates a new
TableModelEvent indicating an UPDATE
to the data in all columns and rows. |
TableModelEvent(TableModel source,
int row)
Creates a new
TableModelEvent indicating an UPDATE
to the data in a single row across all columns. |
TableModelEvent(TableModel source,
int firstRow,
int lastRow)
Creates a new
TableModelEvent indicating an UPDATE
to the data in the specified rows across all columns. |
TableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column)
Creates a new
TableModelEvent indicating an UPDATE
to the data in the specified rows and column. |
TableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column,
int type)
Creates a new
TableModelEvent indicating an operation of
the specified type on the data in the specified rows and
column. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumn()
Returns the affected column of this event.
|
int |
getFirstRow()
Returns the first affected row of this event.
|
int |
getLastRow()
Returns the last affected row of this event.
|
int |
getType()
|
getSource, toStringpublic static final int ALL_COLUMNS
public static final int DELETE
public static final int HEADER_ROW
public static final int INSERT
public static final int UPDATE
protected int column
protected int firstRow
protected int lastRow
protected int type
public TableModelEvent(TableModel source)
TableModelEvent indicating an UPDATE
to the data in all columns and rows.source - the source object (null not permitted).IllegalArgumentException - if source is
null.public TableModelEvent(TableModel source, int row)
TableModelEvent indicating an UPDATE
to the data in a single row across all columns.source - the source object (null not permitted).row - the updated row.IllegalArgumentException - if source is
null.public TableModelEvent(TableModel source, int firstRow, int lastRow)
TableModelEvent indicating an UPDATE
to the data in the specified rows across all columns.source - the source object (null not permitted).firstRow - the first row of update.lastRow - the last row of update.IllegalArgumentException - if source is
null.public TableModelEvent(TableModel source, int firstRow, int lastRow, int column)
TableModelEvent indicating an UPDATE
to the data in the specified rows and column. Use ALL_COLUMNS
for the column argument to indicate all columns.source - the source object (null not permitted).firstRow - the first row of update.lastRow - the last row of update.column - the affected column.IllegalArgumentException - if source is
null.public TableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
TableModelEvent indicating an operation of
the specified type on the data in the specified rows and
column. The event type is usually one of UPDATE, INSERT,
and DELETE.source - the source object (null not permitted).firstRow - the first row of update.lastRow - the last row of update.column - the affected column.type - the type of change.IllegalArgumentException - if source is
null.public int getColumn()
public int getFirstRow()
public int getLastRow()
public int getType()