Then you need to add a corresponding UI binding for drag operations to the row header. This could look like this:
SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer, false);
selectionLayer.addConfiguration(new DefaultSelectionLayerConfiguration());
selectionLayer.addConfiguration(new AbstractUiBindingConfiguration() {
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
IDragMode dragMode = new CellSelectionDragMode() {
@Override
public void fireSelectionCommand(NatTable natTable, int columnPosition, int rowPosition, boolean shiftMask, boolean controlMask) {
int localRowPosition = LayerUtil.convertRowPosition(natTable, rowPosition, selectionLayer);
selectionLayer.selectRow(0, localRowPosition, shiftMask, controlMask);
}
};
uiBindingRegistry.registerFirstMouseDragMode(
MouseEventMatcher.rowHeaderLeftClick(SWT.NONE), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(
MouseEventMatcher.rowHeaderLeftClick(SWT.MOD2), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(
MouseEventMatcher.rowHeaderLeftClick(SWT.MOD1), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(
MouseEventMatcher.rowHeaderLeftClick(SWT.MOD2 | SWT.MOD1), dragMode);
}
});
Although I personally would prefer the creation of corresponding configurations and commandhandlers. But the coding style is up to you and I can't provide a complete clean solution in a forum.