charvax.swing.event

Class TableModelEvent


public class TableModelEvent
extends java.util.EventObject

This event is fired when the data in a table changes.

Field Summary

static int
ALL_COLUMNS
static int
DELETE
static int
INSERT
static int
UPDATE

Constructor Summary

TableModelEvent(TableModel source_)
All row data has changed; listeners should discard all state and re-query the TableModel.
TableModelEvent(TableModel source_, int row_)
This row of data has been updated.
TableModelEvent(TableModel source_, int firstRow_, int lastRow_)
The data in rows [firstRow_, lastRow] have been updated.
TableModelEvent(TableModel source_, int firstRow_, int lastRow_, int column_)
The cells in the specified column in rows [firstRow_, lastRow] have been updated.
TableModelEvent(TableModel source_, int firstRow_, int lastRow_, int column_, int type_)

Method Summary

int
getColumn()
int
getFirstRow()
Get the index of the first row that changed
int
getLastRow()
Get the index of the last row that changed
int
getType()
Returns the type of event - one of INSERT, UPDATE or DELETE.

Field Details

ALL_COLUMNS

public static final int ALL_COLUMNS
Field Value:
-1

DELETE

public static final int DELETE
Field Value:
1

INSERT

public static final int INSERT
Field Value:
2

UPDATE

public static final int UPDATE
Field Value:
3

Constructor Details

TableModelEvent

public TableModelEvent(TableModel source_)
All row data has changed; listeners should discard all state and re-query the TableModel.

TableModelEvent

public TableModelEvent(TableModel source_,
                       int row_)
This row of data has been updated.

TableModelEvent

public TableModelEvent(TableModel source_,
                       int firstRow_,
                       int lastRow_)
The data in rows [firstRow_, lastRow] have been updated.

TableModelEvent

public TableModelEvent(TableModel source_,
                       int firstRow_,
                       int lastRow_,
                       int column_)
The cells in the specified column in rows [firstRow_, lastRow] have been updated.

TableModelEvent

public TableModelEvent(TableModel source_,
                       int firstRow_,
                       int lastRow_,
                       int column_,
                       int type_)

Method Details

getColumn

public int getColumn()

getFirstRow

public int getFirstRow()
Get the index of the first row that changed

getLastRow

public int getLastRow()
Get the index of the last row that changed

getType

public int getType()
Returns the type of event - one of INSERT, UPDATE or DELETE.