Class RowDeleteDataChange
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.datachange.RowDeleteDataChange
-
- All Implemented Interfaces:
DataChange
public class RowDeleteDataChange extends Object implements DataChange
DataChangeimplementation to track row delete operations. Is used in persistent mode and can only discard a row delete operation by adding it again viaRowInsertCommand.- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description RowDeleteDataChange(int rowIndex, Object value)Create aRowDeleteDataChangethat is able to revert the performed row delete operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddiscard(DataChangeLayer layer)Discard the change.ObjectgetKey()protected ObjectgetValue()voidsave(DataChangeLayer layer)Save the change.voidupdateKey(Object key)Update the locally stored key.
-
-
-
Constructor Detail
-
RowDeleteDataChange
public RowDeleteDataChange(int rowIndex, Object value)Create aRowDeleteDataChangethat is able to revert the performed row delete operation.- Parameters:
rowIndex- The row index at which the row should be inserted again.value- The row object that should be inserted again.
-
-
Method Detail
-
discard
public void discard(DataChangeLayer layer)
Description copied from interface:DataChangeDiscard the change.- Specified by:
discardin interfaceDataChange- Parameters:
layer- TheDataChangeLayerused to perform index-position transformations and to trigger the necessary commands to save.
-
save
public void save(DataChangeLayer layer)
Description copied from interface:DataChangeSave the change.- Specified by:
savein interfaceDataChange- Parameters:
layer- TheDataChangeLayerused to perform index-position transformations and to trigger the necessary commands to save.
-
getKey
public Object getKey()
- Specified by:
getKeyin interfaceDataChange- Returns:
- The key used to identify the change in the backing data.
-
updateKey
public void updateKey(Object key)
Description copied from interface:DataChangeUpdate the locally stored key. Used in case the key changed because of structural changes.- Specified by:
updateKeyin interfaceDataChange- Parameters:
key- The updated key.
-
getValue
protected Object getValue()
- Returns:
- The row object that was deleted.
-
-