JIDE 3.5.15

com.jidesoft.pivot
Interface PivotDataEditingProvider


public interface PivotDataEditingProvider

PivotDataEditingProvider is an interface to allow the direct modification of data in pivot table. Since there is no one to one relation between the cells in pivot table and the actual data source row. So it's up to the provider to interpret the data change and modify the data source accordingly. If in a certain case, there is no way to modify the data source, false should be returned in isCellEditable method.


Method Summary
 boolean isCellEditable(PivotDataModel dataModel, int rowIndex, int columnIndex)
          Returns true if the cell at rowIndex and columnIndex of the DataTableModel in PivotDataModel is editable.
 void setValueAt(PivotDataModel dataModel, Object aValue, int rowIndex, int columnIndex)
          This method is called when user changes the the value in the cell at columnIndex and rowIndex to aValue.
 

Method Detail

isCellEditable

boolean isCellEditable(PivotDataModel dataModel,
                       int rowIndex,
                       int columnIndex)
Returns true if the cell at rowIndex and columnIndex of the DataTableModel in PivotDataModel is editable. Otherwise, setValueAt on the cell will not change the value of that cell.

Parameters:
dataModel - the pivot data model.
rowIndex - the row whose value is to be queried
columnIndex - the column whose value is to be queried
Returns:
true if the cell is editable

setValueAt

void setValueAt(PivotDataModel dataModel,
                Object aValue,
                int rowIndex,
                int columnIndex)
This method is called when user changes the the value in the cell at columnIndex and rowIndex to aValue. You should implement this method and modify the corresponding cell or cells in data source so that the change can be persisted.

Parameters:
dataModel - the pivot data model.
aValue - the new value
rowIndex - the row whose value is to be changed
columnIndex - the column whose value is to be changed
See Also:
isCellEditable(com.jidesoft.pivot.PivotDataModel, int, int)

JIDE 3.5.15