Your paint method will then be called every time selection state changes.
Note that this will give you notification not only when selections are made, but also when selections are cleared,. And when the user is interacting with a visualization, you will be called for every change in selections (might miss some, if it is a big document), so theer will be a lot of calls.
Hope this helps
Erik Wetterberg https://extendingqlik.upper88.com/