I’m making some progress with my cross-platform CSV viewing application.
What I’m trying to add at the moment is the ability to re-order the columns. I’m not sure if this is possible by dragging the headers by default - that would be nice.
But the way I’m attempting to do it is by using a ListView containing the column headers, re-ordering that (which I’ve managed to work out), then making the same re-ordering on the TableView.
I can re-order the headers using the TableView.header property. But the columns don’t re-order when I do it.
There don’t seem to be any column-specific methods beyond addColumn and removeColumn. I’ve looked for a trick to prod the TableView into re-building the columns to match the headers, such as calling invalidateComponentLayout(), but nothing works so far, and I’ve reached the limit of my understanding of the implementation.
So, i think this should be possible, but its not something ive actually done, so there very well may be some bugs - ill see about getting a little example together to test and see if there are any issues (if there are ill see about sorting them)
My case in question is here (current commit on master). Use the “Test Load” menu option to populate the TableView.
Hiding and showing headers also doesn’t seem to hide and close the associated columns.
And I’m also having problems with the textfields added dynamically to the ListView for filtering columns, they are mysteriously uneditable. But perhaps that deserves a separate thread?