I'm missing something obvious here.
I have a glazedlists EventList<X>
where X
is my custom class. This list contains a bunch of values. When I update one of the values, how do I make sure the GUI updates its display for that row?
I'm missing something obvious here.
I have a glazedlists EventList<X>
where X
is my custom class. This list contains a bunch of values. When I update one of the values, how do I make sure the GUI updates its display for that row?
The FAQ mentiones two ways under the question:
How do I tell Glazed Lists that an Object in my EventList has been updated?
Either you use the get/set approach as pointed out by Jason, or you make the elements in the list observable by for instance the PropertyChangeListener
and then use the ObservableElementList
. I think this second approach is cleaner and it should also work with concurrent threads.
It looks like you can invoke addListEventListener to register a ListEventListener. See also the Glazed Lists Tutorial.
The way to do this appears to be to replace the list element with itself: