Package org.zkoss.pivot.event
Class PivotDataEvent
java.lang.Object
org.zkoss.pivot.event.PivotDataEvent
A data event is used to notify listeners that a pivot model has changed.
- Author:
- jumperchen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSpecifies all columns in a row or rows.static final intIdentifies the removal of rows or columns.static final intIdentifies the header row.static final intIdentifies the addition of new rows or columns.static final intIdentifies a change to existing data. -
Constructor Summary
ConstructorsConstructorDescriptionPivotDataEvent(PivotModel model) All row data in the pivot model has changed, listeners should discard any state that was based on the rows and requery thePivotModelto get the new row count and all the appropriate values.PivotDataEvent(PivotModel model, int row) This row of data has been updated.PivotDataEvent(PivotModel model, int firstRow, int lastRow) The data in rows [firstRow, lastRow] have been updated.PivotDataEvent(PivotModel model, int firstRow, int lastRow, int column) The cells in column column in the range [firstRow, lastRow] have been updated.PivotDataEvent(PivotModel model, int firstRow, int lastRow, int column, int type) The cells from (firstRow, column) to (lastRow, column) have been changed. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the column for the event.intReturns the first row that changed.intReturns the last row that changed.Returns the pivot model which fires the event.intgetType()Returns the type of event - one of: INSERT, UPDATE and DELETE.
-
Field Details
-
UPDATE
public static final int UPDATEIdentifies a change to existing data.- See Also:
-
DELETE
public static final int DELETEIdentifies the removal of rows or columns.- See Also:
-
INSERT
public static final int INSERTIdentifies the addition of new rows or columns.- See Also:
-
HEADER_ROW
public static final int HEADER_ROWIdentifies the header row.- See Also:
-
ALL_COLUMNS
public static final int ALL_COLUMNSSpecifies all columns in a row or rows.- See Also:
-
-
Constructor Details
-
PivotDataEvent
All row data in the pivot model has changed, listeners should discard any state that was based on the rows and requery thePivotModelto get the new row count and all the appropriate values. ThePivottablewill render the entire visible region on receiving this event, querying the model for the cell values that are visible. The structure of the pivot table i.e., the column names, types and order have not changed. -
PivotDataEvent
This row of data has been updated. To denote the arrival of a completely new pivot table with a different structure useHEADER_ROWas the value for therow. This is the same as callingsetModel(PivotModel)on thePivottable. -
PivotDataEvent
The data in rows [firstRow, lastRow] have been updated. -
PivotDataEvent
The cells in column column in the range [firstRow, lastRow] have been updated. -
PivotDataEvent
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.
-
-
Method Details
-
getPivotModel
Returns the pivot model which fires the event. -
getFirstRow
public int getFirstRow()Returns the first row that changed. HEADER_ROW means the meta data, ie. names, types and order of the columns. -
getLastRow
public int getLastRow()Returns the last row that changed. -
getColumn
public int getColumn()Returns the column for the event. If the return value is ALL_COLUMNS; it means every column in the specified rows changed. -
getType
public int getType()Returns the type of event - one of: INSERT, UPDATE and DELETE.
-