Class RowDeleteDataChangeHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.datachange.AbstractDataChangeHandler<RowDeleteDataChange>
org.eclipse.nebula.widgets.nattable.datachange.RowDeleteDataChangeHandler
- All Implemented Interfaces:
DataChangeHandler
,ILayerEventHandler<RowObjectDeleteEvent>
public class RowDeleteDataChangeHandler
extends AbstractDataChangeHandler<RowDeleteDataChange>
implements ILayerEventHandler<RowObjectDeleteEvent>
DataChangeHandler
to track row delete operations. Registers as
ILayerEventHandler
for the RowObjectDeleteEvent
. 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
ConstructorsConstructorDescriptionRowDeleteDataChangeHandler
(DataChangeLayer layer, CellKeyHandler<?> keyHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Trigger handling ofIStructuralChangeEvent
s to update locally stored changes, e.g.boolean
isCellDirty
(int columnPosition, int rowPosition) Checks if the cell at the given position is dirty.boolean
isColumnDirty
(int columnPosition) Checks if the column with the given position contains cells in a dirty state.boolean
isDirty()
Checks if there is a dirty state tracked by this handler.boolean
isRowDirty
(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
-
RowDeleteDataChangeHandler
- Parameters:
layer
- TheDataChangeLayer
this handler should be assigned to.keyHandler
- TheCellKeyHandler
that is used to store dataChanges for a specific key.
-
-
Method Details
-
handleStructuralChange
Description copied from interface:DataChangeHandler
Trigger handling ofIStructuralChangeEvent
s 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:
handleStructuralChange
in interfaceDataChangeHandler
- Parameters:
event
- The event to handle.
-
isColumnDirty
public boolean isColumnDirty(int columnPosition) Description copied from interface:DataChangeHandler
Checks if the column with the given position contains cells in a dirty state.- Specified by:
isColumnDirty
in interfaceDataChangeHandler
- Parameters:
columnPosition
- The position of the column whose dirty state should be checked.- Returns:
true
if the column contains cells that are marked as dirty (data has changed and not saved yet),false
if not.
-
isRowDirty
public boolean isRowDirty(int rowPosition) Description copied from interface:DataChangeHandler
Checks if the row with the given position contains cells in a dirty state.- Specified by:
isRowDirty
in interfaceDataChangeHandler
- Parameters:
rowPosition
- The position of the row whose dirty state should be checked.- Returns:
true
if the row contains cells that are marked as dirty (data has changed and not saved yet),false
if not.
-
isCellDirty
public boolean isCellDirty(int columnPosition, int rowPosition) Description copied from interface:DataChangeHandler
Checks if the cell at the given position is dirty.- Specified by:
isCellDirty
in 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:
true
if the cell is dirty (data has changed and not saved yet),false
if not.
-
isDirty
public boolean isDirty()Description copied from interface:DataChangeHandler
Checks if there is a dirty state tracked by this handler.- Specified by:
isDirty
in interfaceDataChangeHandler
- Returns:
true
if there is a dirty state (data has changed and not saved yet),false
if not.
-
handleLayerEvent
- Specified by:
handleLayerEvent
in interfaceILayerEventHandler<RowObjectDeleteEvent>
-
getLayerEventClass
- Specified by:
getLayerEventClass
in interfaceILayerEventHandler<RowObjectDeleteEvent>
-