List<EObject> values; eventList = GlazedLists.eventList(values); // some other list wrappers to add filter and sorting treeList = new TreeList(filterList, new MyCustomTreeFormat(), TreeList.NODES_START_EXPANDED); bodyDataProvider = new ListDataProvider<>(treeList, columnPropertyAccessor);
Not sure what you are trying to achieve and how you are doing it.
And of course the row position in a LayerEvent on the NatTable layer is different from what it is in the underlying list. At least if you are using a GridLayer and a ViewportLayer. That is related to the index-position transformation.
public void handleLayerEvent(ILayerEvent event) { if (event instanceof CellSelectionEvent) { CellSelectionEvent cellEvent = (CellSelectionEvent) event; EObject element = bodyLayerStack.getBodyDataProvider()).getRowObject(cellEvent.getRowPosition()); if (element != null) selectionService.setSelection(element); } }