JIDE 3.5.15

com.jidesoft.grid
Class RowHeightChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jidesoft.grid.RowHeightChangeEvent
All Implemented Interfaces:
Serializable

public class RowHeightChangeEvent
extends EventObject

RowHeightChangeEvent is used to notify listeners that a table's row height has changed. Depending on the parameters used in the constructors, the RowHeightChangeEvent can be used to specify the following types of changes:

 RowHeightChangeEvent(source);              //  The data, i.e. all rows height changed
 RowHeightChangeEvent(source, 1);           //  Row 1 height changed
 RowHeightChangeEvent(source, 3, 6);        //  Rows 3 to 6 inclusive changed
 RowHeightChangeEvent(source, 3, 6, INSERT); // Rows (3, 6) were inserted
 RowHeightChangeEvent(source, 3, 6, DELETE); // Rows (3, 6) were deleted
 

See Also:
Serialized Form

Field Summary
static int DELETE
          Identifies the removal of rows.
protected  int firstRow
           
static int INSERT
          Identifies the addition of new rows.
protected  int lastRow
           
protected  int type
           
static int UPDATE
          Identifies a change to existing data.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RowHeightChangeEvent(RowHeights source)
          All row data in the table has changed, listeners should discard any state that was based on the rows and re-query the RowHeights to get the new row count and all the appropriate values.
RowHeightChangeEvent(RowHeights source, int row)
          This row of data has been updated.
RowHeightChangeEvent(RowHeights source, int firstRow, int lastRow)
          The data in rows [firstRow, lastRow] have been updated.
RowHeightChangeEvent(RowHeights source, int firstRow, int lastRow, int type)
          The cells from (firstRow, column) to (lastRow, column) have been changed.
 
Method Summary
 int getFirstRow()
          Returns the first row that is changed.
 int getLastRow()
          Returns the last row that changed.
 int getType()
          Returns the type of event - one of: INSERT, UPDATE and DELETE.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final int INSERT
Identifies the addition of new rows.

See Also:
Constant Field Values

UPDATE

public static final int UPDATE
Identifies a change to existing data.

See Also:
Constant Field Values

DELETE

public static final int DELETE
Identifies the removal of rows.

See Also:
Constant Field Values

type

protected int type

firstRow

protected int firstRow

lastRow

protected int lastRow
Constructor Detail

RowHeightChangeEvent

public RowHeightChangeEvent(RowHeights source)
All row data in the table has changed, listeners should discard any state that was based on the rows and re-query the RowHeights 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, i.e. the column names, types and order have not changed.

Parameters:
source - the source for the event.

RowHeightChangeEvent

public RowHeightChangeEvent(RowHeights source,
                            int row)
This row of data has been updated. To denote the arrival of a completely new table with a different structure use 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(RowHeights) on the JTable.

Parameters:
source - the source for the event.
row - the row index.

RowHeightChangeEvent

public RowHeightChangeEvent(RowHeights source,
                            int firstRow,
                            int lastRow)
The data in rows [firstRow, lastRow] have been updated.

Parameters:
source - the source for the event.
firstRow - the first row index.
lastRow - the last row index.

RowHeightChangeEvent

public RowHeightChangeEvent(RowHeights source,
                            int firstRow,
                            int lastRow,
                            int type)
The cells from (firstRow, column) to (lastRow, column) have been changed. The column refers to the column index of the cell in the model's co-ordinate system. When column is ALL_COLUMNS, all cells in the specified range of rows are considered changed.

The type should be one of: INSERT, UPDATE and DELETE.

Parameters:
source - the source for the event.
firstRow - the first row index.
lastRow - the last row index.
type - the event type.
Method Detail

getFirstRow

public int getFirstRow()
Returns the first row that is changed. HEADER_ROW means the meta data, ie. names, types and order of the columns.

Returns:
the first row that is changed.

getLastRow

public int getLastRow()
Returns the last row that changed.

Returns:
the last row that is changed.

getType

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

Returns:
the event type.

toString

public String toString()
Overrides:
toString in class EventObject

JIDE 3.5.15