Class SummaryRowPreserveSelectionModel<T>

java.lang.Object
org.eclipse.nebula.widgets.nattable.selection.preserve.PreserveSelectionModel<T>
org.eclipse.nebula.widgets.nattable.selection.preserve.SummaryRowPreserveSelectionModel<T>
Type Parameters:
T - the type of object in the backing data list.
All Implemented Interfaces:
ILayerEventHandler<IStructuralChangeEvent>, IMarkerSelectionModel, ISelectionModel

public class SummaryRowPreserveSelectionModel<T> extends PreserveSelectionModel<T>
Specialization of PreserveSelectionModel that is also able to handle and preserve selections in a summary row.
Since:
1.6
  • Constructor Details

    • SummaryRowPreserveSelectionModel

      public SummaryRowPreserveSelectionModel(IUniqueIndexLayer selectionLayer, IRowDataProvider<T> rowDataProvider, IRowIdAccessor<T> rowIdAccessor)
      Creates a row sortable selection model that supports selection in a summary row.
      Parameters:
      selectionLayer - provider of cell information
      rowDataProvider - provider of underlying row objects
      rowIdAccessor - provider of unique IDs for the rows
  • Method Details

    • getRowIdByPosition

      protected Serializable getRowIdByPosition(int rowPosition)
      Description copied from class: PreserveSelectionModel
      Retrieves the row ID for a row position
      Overrides:
      getRowIdByPosition in class PreserveSelectionModel<T>
      Parameters:
      rowPosition - row position for retrieving row ID
      Returns:
      row ID for rowPosition, or null if undefined
    • getRowPositionByRowObject

      protected int getRowPositionByRowObject(T rowObject)
      Description copied from class: PreserveSelectionModel
      Retrieves the row position for a row object
      Overrides:
      getRowPositionByRowObject in class PreserveSelectionModel<T>
      Parameters:
      rowObject - row object for retrieving row position
      Returns:
      row position for rowObject, or -1 if undefined
    • ignoreVerticalChange

      protected boolean ignoreVerticalChange(org.eclipse.nebula.widgets.nattable.selection.preserve.Selections.Row<T> row)
      Description copied from class: PreserveSelectionModel
      Check if the default handling for vertical structure changes should be performed for the given Selections.Row, or if it should be skipped. Skipping for example would make sense for selections that are stored for rows that have no row data in the backing data structure, e.g. a summary row selection.
      Overrides:
      ignoreVerticalChange in class PreserveSelectionModel<T>
      Parameters:
      row - The internal selected row representation.
      Returns:
      false if the default handling for vertical changes should be performed, true if the default handling should be skipped.