Class RowInsertDataChangeHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.datachange.AbstractDataChangeHandler<RowInsertDataChange>
org.eclipse.nebula.widgets.nattable.datachange.RowInsertDataChangeHandler
- All Implemented Interfaces:
DataChangeHandler,ILayerEventHandler<RowInsertEvent>
public class RowInsertDataChangeHandler
extends AbstractDataChangeHandler<RowInsertDataChange>
implements ILayerEventHandler<RowInsertEvent>
DataChangeHandler to track row insert operations. Registers as
ILayerEventHandler for the RowInsertEvent. It is intended to
be used with a configuration that directly updates the backing data.
Temporary data storage is not supported. It therefore is able to perform
discard operations and will do nothing on save.- Since:
- 1.6
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.datachange.AbstractDataChangeHandler
dataChanges, handleDataUpdate, keyHandler, layer -
Constructor Summary
ConstructorsConstructorDescriptionRowInsertDataChangeHandler(DataChangeLayer layer, CellKeyHandler<?> keyHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleLayerEvent(RowInsertEvent event) voidhandleStructuralChange(IStructuralChangeEvent structuralChangeEvent) Trigger handling ofIStructuralChangeEvents to update locally stored changes, e.g.booleanisCellDirty(int columnPosition, int rowPosition) Checks if the cell at the given position is dirty.booleanisColumnDirty(int columnPosition) Checks if the column with the given position contains cells in a dirty state.booleanisDirty()Checks if there is a dirty state tracked by this handler.booleanisRowDirty(int rowPosition) Checks if the row with the given position contains cells in a dirty state.Methods inherited from class org.eclipse.nebula.widgets.nattable.datachange.AbstractDataChangeHandler
clearDataChanges, disableTracking, enableTracking, getDataChanges, getKeyHandler
-
Constructor Details
-
RowInsertDataChangeHandler
- Parameters:
layer- TheDataChangeLayerthis handler should be assigned to.keyHandler- TheCellKeyHandlerthat is used to store dataChanges for a specific key.
-
-
Method Details
-
handleStructuralChange
Description copied from interface:DataChangeHandlerTrigger handling ofIStructuralChangeEvents to update locally stored changes, e.g. update the row index of a key in case a row above was inserted or deleted.- Specified by:
handleStructuralChangein interfaceDataChangeHandler- Parameters:
structuralChangeEvent- The event to handle.
-
isColumnDirty
public boolean isColumnDirty(int columnPosition) Description copied from interface:DataChangeHandlerChecks if the column with the given position contains cells in a dirty state.- Specified by:
isColumnDirtyin interfaceDataChangeHandler- Parameters:
columnPosition- The position of the column whose dirty state should be checked.- Returns:
trueif the column contains cells that are marked as dirty (data has changed and not saved yet),falseif not.
-
isRowDirty
public boolean isRowDirty(int rowPosition) Description copied from interface:DataChangeHandlerChecks if the row with the given position contains cells in a dirty state.- Specified by:
isRowDirtyin interfaceDataChangeHandler- Parameters:
rowPosition- The position of the row whose dirty state should be checked.- Returns:
trueif the row contains cells that are marked as dirty (data has changed and not saved yet),falseif not.
-
isCellDirty
public boolean isCellDirty(int columnPosition, int rowPosition) Description copied from interface:DataChangeHandlerChecks if the cell at the given position is dirty.- Specified by:
isCellDirtyin interfaceDataChangeHandler- Parameters:
columnPosition- The column position of the cell whose dirty state should be checked.rowPosition- The row position of the cell whose dirty state should be checked.- Returns:
trueif the cell is dirty (data has changed and not saved yet),falseif not.
-
isDirty
public boolean isDirty()Description copied from interface:DataChangeHandlerChecks if there is a dirty state tracked by this handler.- Specified by:
isDirtyin interfaceDataChangeHandler- Returns:
trueif there is a dirty state (data has changed and not saved yet),falseif not.
-
handleLayerEvent
- Specified by:
handleLayerEventin interfaceILayerEventHandler<RowInsertEvent>
-
getLayerEventClass
- Specified by:
getLayerEventClassin interfaceILayerEventHandler<RowInsertEvent>
-