Changing the eventlist that filterlists are watching
Hello all,
I'm sorry if this question has been asked a number of times - I don't know what term to look for so I'm hoping someone can point me in the correct direction.
Basically, I have a 'main' Jlist of items. Each item in the list has it's own EventList associated with it. In the same user interface, I have a number of other lists, each list being backed by a filter list.
What I'm wanting to acheive is that when the main list selection changes, I can somehow update the filter lists to look at the new EventList, without duplicating the list contents. At present the hacky approach I'm using is to addAll of the eventList to an EventList shared by the other lists. This has the desired effect, but is not optimal. The main problem being that when I add things to the proper EventList, they aren't reflected in the user interface, and vice versa.
Is there a recommended way to approach this?
Many thanks in advance!
Cheers,
Jonathan Giles