I recognized a odd behavior in the ViewportLayer. When my table is scrolled to the right end and I am going back a cell to the left, the viewport is also scrolled back a cell so that the last cell will be out of the viewport.
I tracked this behavior down to the ViewportLayer.moveColumnPositionIntoViewport method. There the viewportEndX is calculated with the leftmost cell border and not with the absolute position of the origin.
int viewportEndX = underlyingLayer.getStartXOfColumnPosition(getOriginColumnPosition()) + clientAreaWidth;
Because of this the viewport will be scrolled to the left, hiding the last cells, as long as the leftmost cell is not fully visible.
With this code the table would remain scrolled to the right until a cell on the right is selected which is not fully visible.
int viewportEndX = getOrigin().getX() + clientAreaWidth;
So I would like to know is this a bug or is this intentional?