Here is my scenario: I have 3 views on an application, 2 of which are identical save for 1 thing - one has additional filtering. All of the views are using the same model because they display the same data in (somewhat) different ways. The 2 similar views are both JTables and are as follows:
- View 1 filters results on a basic level
- View 2 (should) filter firstly on this same basic level, as well as on a more granular level
I can and have created the filter for the 2nd view, however since both views use the same model (which implements TableModel), they both call the same function in the model for data - getValueAt(int rowIndex, int columnIndex)
- which currently only filters on the basic level.
What is the simplest way to additionally filter for the 2nd view, without affecting the 1st? How would I go about implementing this?
Thanks in advance.