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
  • Constructor Details

  • Method Details

    • handleStructuralChange

      public void handleStructuralChange(IStructuralChangeEvent structuralChangeEvent)
      Description copied from interface: DataChangeHandler
      Trigger handling of IStructuralChangeEvents 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 interface DataChangeHandler
      Parameters:
      structuralChangeEvent - 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 interface DataChangeHandler
      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 interface DataChangeHandler
      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 interface DataChangeHandler
      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.
    • handleLayerEvent

      public void handleLayerEvent(RowInsertEvent event)
      Specified by:
      handleLayerEvent in interface ILayerEventHandler<RowInsertEvent>
    • getLayerEventClass

      public Class<RowInsertEvent> getLayerEventClass()
      Specified by:
      getLayerEventClass in interface ILayerEventHandler<RowInsertEvent>