Closed GoogleCodeExporter closed 9 years ago
There's actually not a good way to automatically repaint after a node's data
changes. The same problem exists
in JTree, where if you change the node data, you must then inform the JTree
that data has changed so that it
can repaint. What I'm missing though, is a nice method in SourceList that you
can call when your data has
changed, maybe:
dataChanged
dataChanged(SourceListItem item)
which would essentially do a repaint of the whole tree or a particular node.
Does that solution sound like it would work for your use case?
Original comment by kenneth....@gmail.com
on 5 Oct 2008 at 11:36
Note also, that to work around the issue you're seeing, call
mySourceList.getComponent().repaint() after setting
the counter value.
Let me know if the suggested solution in my previous comment would meet your
needs.
Original comment by kenneth....@gmail.com
on 6 Oct 2008 at 2:25
Original comment by kenneth....@gmail.com
on 9 Jan 2009 at 12:53
I've added property change support to SourceListItems. The SourceListModel adds
itself as a listener to each item
and fires an event to SourceListListeners when an item changes. SourceList
listens to these changes and causes
the corresponding node to repaint.
Original comment by kenneth....@gmail.com
on 20 Jun 2009 at 8:15
Original issue reported on code.google.com by
jonb...@gmail.com
on 5 Oct 2008 at 6:35