use of net.sourceforge.nattable.layer.event.RowStructuralChangeEvent in project translationstudio8 by heartsome.
the class RowSelectionPreserver method handleLayerEvent.
/**
* On a change in the underlying data:
* <ol>
* <li>Clears the selection
* <li>Re-select the row objects selected earlier.
* </ol>
*/
public void handleLayerEvent(IVisualChangeEvent event) {
if (ObjectUtils.isEmpty(selectedRowObjects)) {
return;
}
if (event instanceof RowStructuralRefreshEvent || event instanceof RowStructuralChangeEvent || event instanceof SortColumnEvent) {
selectionLayer.clear();
selectionProvider.setSelection(new StructuredSelection(getValidSelections()));
}
}
Aggregations