public class TableModelEvent
extends java.util.EventObject
TableModel.| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_COLUMNS
A value for
column parameters indicating that all columns
of the table were affected by the change. |
static int |
DELETE
An event type indicating one or more table rows were deleted.
|
static int |
HEADER_ROW
A value row-describing parameters/properties, (i.e.,
row,
firstRow, and lastRow)
indicating the table header was affected. |
static int |
INSERT
An event type indicating one or more table rows were inserted.
|
static int |
STRUCTURE_CHANGED
An event type indicating the table structure was modified.
|
static int |
UPDATE
An event type indicating one or more table rows were updated.
|
| Constructor and Description |
|---|
TableModelEvent(TableModel source)
Creates a
TableModelEvent describing a change to any or
all rows of a table. |
TableModelEvent(TableModel source,
int row)
Creates a
TableModelEvent indicating a change to any or
all columns of a single table row. |
TableModelEvent(TableModel source,
int firstRow,
int lastRow)
Creates a
TableModelEvent indicating a change to any or
all columns of an interval of table rows. |
TableModelEvent(TableModel source,
int column,
int firstRow,
int lastRow)
Creates a
TableModelEvent indicating a change to a
particular column of a single table row or an interval of table rows. |
TableModelEvent(TableModel source,
int column,
int firstRow,
int lastRow,
int type)
Primary constructor for creating
TableModelEvents. |
| Modifier and Type | Method and Description |
|---|---|
int |
getColumn()
Returns the column that was affected by the update.
|
int |
getFirstRow()
Returns the first row that was affected by the update.
|
int |
getLastRow()
Returns the last row that was affected by the update.
|
int |
getType()
Returns the type of update that occurred.
|
public static final int ALL_COLUMNS
column parameters indicating that all columns
of the table were affected by the change.public static final int HEADER_ROW
row,
firstRow, and lastRow)
indicating the table header was affected.public static final int DELETE
public static final int INSERT
public static final int UPDATE
public static final int STRUCTURE_CHANGED
public TableModelEvent(TableModel source)
TableModelEvent describing a change to any or
all rows of a table.source - the changed TableModelpublic TableModelEvent(TableModel source, int row)
TableModelEvent indicating a change to any or
all columns of a single table row.source - the changed TableModelrow - the index of the affected rowpublic TableModelEvent(TableModel source, int firstRow, int lastRow)
TableModelEvent indicating a change to any or
all columns of an interval of table rows.source - the changed TableModelfirstRow - the first table row affected by the updatelastRow - the last table row affected by the updatepublic TableModelEvent(TableModel source, int column, int firstRow, int lastRow)
TableModelEvent indicating a change to a
particular column of a single table row or an interval of table rows.source - the changed TableModelcolumn - the column that was affected by the updatefirstRow - the first table row affected by the updatelastRow - the last table row affected by the updatepublic TableModelEvent(TableModel source, int column, int firstRow, int lastRow, int type)
TableModelEvents.
All other constructors are for convenience and must invoke this
constructor.source - the changed TableModelcolumn - the column that was affected by the update,
or ALL_COLUMNS if all columns were affected.firstRow - the first table row affected by the updatelastRow - the last table row affected by the updatetype - The type of change that occurred, one of the following
values:
public int getColumn()
public int getFirstRow()
public int getLastRow()
public int getType()