use of org.eclipse.nebula.widgets.nattable.extension.builder.configuration.SelectionStyleConfiguration in project nebula.widgets.nattable by eclipse.
the class NatTableBuilder method configureSelectionStyle.
/**
* Set up selection behavior. Select cells vs select rows.
*/
protected void configureSelectionStyle() {
SelectionLayer selectionLayer = bodyLayer.getSelectionLayer();
if (tableModel.enableFullRowSelection) {
selectionLayer.addConfiguration(new RowOnlySelectionConfiguration<T>());
natTable.addConfiguration(new RowSelectionUIBindings());
selectionLayer.setSelectionModel(new RowSelectionModel<T>(selectionLayer, bodyLayer.getDataProvider(), rowIdAccessor));
} else {
selectionLayer.addConfiguration(new DefaultSelectionLayerConfiguration());
}
natTable.addConfiguration(new SelectionStyleConfiguration(tableStyle));
}
Aggregations