Ralph Kar schrieb:
> 
> Hi all,
> 
> it seems that I am stuck with a problem that I just cannot get a grip on.
> I want to be able to filter the content that is displayed in a JTable. I
> want to be able to attach a filter to each column and a row should only be
> displyed when the filters of the columns of that row match.
> 
> I have done something similar for sorting the content of the JTable, but
> for exclusion filtering it seems to be way more difficult, because there
> is always a piece of necessary information missing.

hmm, I don't see any difficulty if you do it with the same approach
like in the jfc examples: The TableMap introduced there is only an
additional layer on top of the original tableModel and the TableMap
(or filter) maps the row numbers of the delegate to the row numbers as
presented to the view. Then make the FilterableTableModel a TableMap
and give it the control about the filters. Whenever a filter for a
certain column is set on or off, it loops through the rows of the
delegate tableModel, using the coordinate system of this complete
tableModel -  and passes through only those rows that are still
visible. To the outside it presents the data in it's own - mapped -
coordinate system.

Greetings
Jeanette

PS: as far as I know Philip is no longer working with the SwingTeam.
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to