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 ofPreserveSelectionModel
that 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 Serializable
getRowIdByPosition(int rowPosition)
Retrieves the row ID for a row positionprotected int
getRowPositionByRowObject(T rowObject)
Retrieves the row position for a row objectprotected boolean
ignoreVerticalChange(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:PreserveSelectionModel
Retrieves the row ID for a row position- Overrides:
getRowIdByPosition
in 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:PreserveSelectionModel
Retrieves the row position for a row object- Overrides:
getRowPositionByRowObject
in 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:PreserveSelectionModel
Check 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:
ignoreVerticalChange
in classPreserveSelectionModel<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.
-
-