public class IlvTableModelEvent extends TableModelEvent
TableModelEvent
provides some additional event
types that are needed to inform listeners before a row will either be
deleted or updated.Modifier and Type | Field and Description |
---|---|
static int |
BEFORE_DELETE
Identifies that a row is about to be removed.
|
static int |
BEFORE_UPDATE
Identifies that a row is about to be updated.
|
ALL_COLUMNS, column, DELETE, firstRow, HEADER_ROW, INSERT, lastRow, type, UPDATE
source
Constructor and Description |
---|
IlvTableModelEvent(TableModel source)
All row data in the table has changed, listeners should discard any state
that was based on the rows and requery the
TableModel
to get the new row count and all the appropriate values. |
IlvTableModelEvent(TableModel source,
int row)
This row of data has been updated.
|
IlvTableModelEvent(TableModel source,
int firstRow,
int lastRow)
The data in rows [firstRow, lastRow] have been updated.
|
IlvTableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column)
The cells in column column in the range
[firstRow, lastRow] have been updated.
|
IlvTableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column,
int type)
The cells from (firstRow, column) to (lastRow, column) have been changed.
|
Modifier and Type | Method and Description |
---|---|
static void |
fireBeforeTableDataChanged(AbstractTableModel model)
Notifies all listeners of the given
AbstractTableModel that
all cell values in the table's
rows are about to changed. |
static void |
fireBeforeTableRowsDeleted(AbstractTableModel model,
int firstRow,
int lastRow)
Notifies all listeners of the given
AbstractTableModel
that rows in the range
[firstRow, lastRow] , inclusive, are about to be deleted. |
static void |
fireBeforeTableStructureChanged(AbstractTableModel model)
Notifies all listeners of the given
AbstractTableModel that
the table's structure is about to changed. |
getColumn, getFirstRow, getLastRow, getType
getSource, toString
public static final int BEFORE_DELETE
public static final int BEFORE_UPDATE
public IlvTableModelEvent(TableModel source)
TableModel
to get the new row count and all the appropriate values.
The JTable
will repaint the entire visible region on
receiving this event, querying the model for the cell values that are visible.
The structure of the table ie, the column names, types and order
have not changed.public IlvTableModelEvent(TableModel source, int row)
HEADER_ROW
as the value for the row
.
When the JTable
receives this event and its
autoCreateColumnsFromModel
flag is set it discards any TableColumns that it had and reallocates
default ones in the order they appear in the model. This is the
same as calling setModel(TableModel)
on the JTable
.public IlvTableModelEvent(TableModel source, int firstRow, int lastRow)
public IlvTableModelEvent(TableModel source, int firstRow, int lastRow, int column)
public IlvTableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
The type should be one of: INSERT, BEFORE_UPDATE, UPDATE, BEFORE_DELETE and DELETE.
public static void fireBeforeTableRowsDeleted(AbstractTableModel model, int firstRow, int lastRow)
AbstractTableModel
that rows in the range
[firstRow, lastRow]
, inclusive, are about to be deleted.model
- the table modelfirstRow
- the first rowlastRow
- the last rowpublic static void fireBeforeTableStructureChanged(AbstractTableModel model)
AbstractTableModel
that
the table's structure is about to changed.
The number of columns in the table, and the names and types of
the new columns may be different from the previous state.
If the JTable
receives this event and its
autoCreateColumnsFromModel
flag is set it discards any table columns that it had and reallocates
default columns in the order they appear in the model. This is the
same as calling setModel(TableModel)
on the
JTable
.public static void fireBeforeTableDataChanged(AbstractTableModel model)
AbstractTableModel
that
all cell values in the table's
rows are about to changed. The number of rows may also be about to changed.
The structure of the table (as in the order of the
columns) is assumed to stay the same.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.