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 usedCellKeyHandlerand correspondingDataChanges that are collected in this handler.protected booleanFlag that is used to temporarily disable event handling.protected final CellKeyHandlerTheCellKeyHandlerthat is used to store dataChanges for a specific key.protected final DataChangeLayerTheDataChangeLayerthis handler is assigned to. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDataChangeHandler(DataChangeLayer layer, CellKeyHandler<?> keyHandler, Map<Object, T> dataChanges) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the locally stored changes.voidDisable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.voidEnable 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, waitMethods inherited from interface org.eclipse.nebula.widgets.nattable.datachange.DataChangeHandler
handleStructuralChange, isCellDirty, isColumnDirty, isDirty, isRowDirty
-
Field Details
-
layer
TheDataChangeLayerthis handler is assigned to. -
keyHandler
TheCellKeyHandlerthat is used to store dataChanges for a specific key. -
dataChanges
Collection of modified identifiers according to the usedCellKeyHandlerand correspondingDataChanges that are collected in this handler. -
handleDataUpdate
protected boolean handleDataUpdateFlag that is used to temporarily disable event handling. Used to not handleDataUpdateEvents on discard.
-
-
Constructor Details
-
AbstractDataChangeHandler
public AbstractDataChangeHandler(DataChangeLayer layer, CellKeyHandler<?> keyHandler, Map<Object, T> dataChanges) - Parameters:
layer- TheDataChangeLayerthis handler should be assigned to.keyHandler- TheCellKeyHandlerthat 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:DataChangeHandlerDisable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.- Specified by:
disableTrackingin interfaceDataChangeHandler
-
enableTracking
public void enableTracking()Description copied from interface:DataChangeHandlerEnable tracking of data changes to keep track of all changes.- Specified by:
enableTrackingin interfaceDataChangeHandler
-
clearDataChanges
public void clearDataChanges()Description copied from interface:DataChangeHandlerClear the locally stored changes.- Specified by:
clearDataChangesin interfaceDataChangeHandler
-
getKeyHandler
- Returns:
- The
CellKeyHandlerthat is used to store dataChanges for a specific key.
-
getDataChanges
- Returns:
- Collection of modified identifiers according to the used
CellKeyHandlerand correspondingDataChanges that are collected in this handler.
-