Class AbstractDataChangeHandler<T extends DataChange>
java.lang.Object
org.eclipse.nebula.widgets.nattable.datachange.AbstractDataChangeHandler<T>
- All Implemented Interfaces:
DataChangeHandler
- Direct Known Subclasses:
RowDeleteDataChangeHandler
,RowInsertDataChangeHandler
,UpdateDataChangeHandler
public abstract class AbstractDataChangeHandler<T extends DataChange>
extends Object
implements DataChangeHandler
Abstract implementation of
DataChangeHandler
to handle data updates.- Since:
- 1.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionCollection of modified identifiers according to the usedCellKeyHandler
and correspondingDataChange
s that are collected in this handler.protected boolean
Flag that is used to temporarily disable event handling.protected final CellKeyHandler
TheCellKeyHandler
that is used to store dataChanges for a specific key.protected final DataChangeLayer
TheDataChangeLayer
this handler is assigned to. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDataChangeHandler
(DataChangeLayer layer, CellKeyHandler<?> keyHandler, Map<Object, T> dataChanges) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the locally stored changes.void
Disable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.void
Enable tracking of data changes to keep track of all changes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.nebula.widgets.nattable.datachange.DataChangeHandler
handleStructuralChange, isCellDirty, isColumnDirty, isDirty, isRowDirty
-
Field Details
-
layer
TheDataChangeLayer
this handler is assigned to. -
keyHandler
TheCellKeyHandler
that is used to store dataChanges for a specific key. -
dataChanges
Collection of modified identifiers according to the usedCellKeyHandler
and correspondingDataChange
s that are collected in this handler. -
handleDataUpdate
protected boolean handleDataUpdateFlag that is used to temporarily disable event handling. Used to not handleDataUpdateEvent
s on discard.
-
-
Constructor Details
-
AbstractDataChangeHandler
public AbstractDataChangeHandler(DataChangeLayer layer, CellKeyHandler<?> keyHandler, Map<Object, T> dataChanges) - Parameters:
layer
- TheDataChangeLayer
this handler should be assigned to.keyHandler
- TheCellKeyHandler
that is used to store data changes for a specific key.dataChanges
- The map to track the data changes locally.
-
-
Method Details
-
disableTracking
public void disableTracking()Description copied from interface:DataChangeHandler
Disable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.- Specified by:
disableTracking
in interfaceDataChangeHandler
-
enableTracking
public void enableTracking()Description copied from interface:DataChangeHandler
Enable tracking of data changes to keep track of all changes.- Specified by:
enableTracking
in interfaceDataChangeHandler
-
clearDataChanges
public void clearDataChanges()Description copied from interface:DataChangeHandler
Clear the locally stored changes.- Specified by:
clearDataChanges
in interfaceDataChangeHandler
-
getKeyHandler
- Returns:
- The
CellKeyHandler
that is used to store dataChanges for a specific key.
-
getDataChanges
- Returns:
- Collection of modified identifiers according to the used
CellKeyHandler
and correspondingDataChange
s that are collected in this handler.
-