I'm using GlazedLists to autogenerate an EventTableModel from an EventList, for use with a JTable in a JScrollbarPane.
I'm using the EventList as a FIFO, a bunch of elements are added to the end, then a bunch of elements are sometimes removed from the beginning. When elements are removed, the selection works exactly as I expect: even though the index of the selection has changed, the same elements are selected (or at least the ones that are still in the table). It's great.
Obviously if the objects change their indices due to deleting items at the beginning, it is impossible to keep the viewport showing a fixed range of objects, and a fixed range of indices. The default behavior seems to be to keep the viewport the same.
If I wanted to keep the selected objects at the same place in the viewport, is there a way I can do that? (e.g. set up an event listener on the EventTableModel or the JScrollbarPane or something, and compute the right scrollbar setting so that when I delete items from the beginning, the viewport moves with the objects?)