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 ofPreserveSelectionModelthat is also able to handle and preserve selections in a summary row.- Since:
- 1.6
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.selection.preserve.PreserveSelectionModel
selectionLayer
-
-
Constructor Summary
Constructors Constructor Description SummaryRowPreserveSelectionModel(IUniqueIndexLayer selectionLayer, IRowDataProvider<T> rowDataProvider, IRowIdAccessor<T> rowIdAccessor)Creates a row sortable selection model that supports selection in a summary row.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SerializablegetRowIdByPosition(int rowPosition)Retrieves the row ID for a row positionprotected intgetRowPositionByRowObject(T rowObject)Retrieves the row position for a row objectprotected booleanignoreVerticalChange(org.eclipse.nebula.widgets.nattable.selection.preserve.Selections.Row<T> row)Check if the default handling for vertical structure changes should be performed for the givenSelections.Row, or if it should be skipped.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.selection.preserve.PreserveSelectionModel
addSelection, addSelection, clearSelection, clearSelection, clearSelection, getFullySelectedColumnPositions, getFullySelectedRowPositions, getLastSelectedCell, getLastSelectedRegion, getLayerEventClass, getSelectedColumnPositions, getSelectedRowCount, getSelectedRowPositions, getSelectionAnchor, getSelections, handleLayerEvent, isCellPositionSelected, isColumnPositionFullySelected, isColumnPositionSelected, isEmpty, isMultipleSelectionAllowed, isRowPositionFullySelected, isRowPositionSelected, setLastSelectedCell, setLastSelectedRegion, setLastSelectedRegion, setMultipleSelectionAllowed, setSelectionAnchor
-
-
-
-
Constructor Detail
-
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 informationrowDataProvider- provider of underlying row objectsrowIdAccessor- provider of unique IDs for the rows
-
-
Method Detail
-
getRowIdByPosition
protected Serializable getRowIdByPosition(int rowPosition)
Description copied from class:PreserveSelectionModelRetrieves the row ID for a row position- Overrides:
getRowIdByPositionin classPreserveSelectionModel<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:PreserveSelectionModelRetrieves the row position for a row object- Overrides:
getRowPositionByRowObjectin classPreserveSelectionModel<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:PreserveSelectionModelCheck if the default handling for vertical structure changes should be performed for the givenSelections.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:
ignoreVerticalChangein classPreserveSelectionModel<T>- Parameters:
row- The internal selected row representation.- Returns:
falseif the default handling for vertical changes should be performed,trueif the default handling should be skipped.
-
-