-
Frederic Marion-Poll March 31, 2020 at 10:36 am
dear all,
in the Icy documentation, there are 2 types of SequenceListener, one of which is called WeakSequenceListener. Is this class still relevant? I did not find it in use anywhere. The purpose of WeakListener is to be able to do a “getListener”?
Thank you in advance for your help
Fred
Frederic Marion-Poll March 31, 2020 at 11:06 amPS more specifically, I was looking for a way to know when a viewer is displaying a different image from a sequence. I suppose I should not add a listener to the sequence, but rather to its viewer?
- This reply was modified 4 years, 8 months ago by Frederic Marion-Poll.
Frederic Marion-Poll March 31, 2020 at 12:02 pmPPS problem solved by listening to the Viewer. Sorry for the previous PS. But I would still be interested to understand the difference between a plain listener and a weaklistener.
Stephane Dallongeville March 31, 2020 at 2:44 pmHi Frederic,
Indeed when you want to have change from the viewer (Z / T position change for instance) then you need to listen the Viewer then. About Weak vs no Weak, it’s a java thing 🙂 Using a WeakListener mean that the listener won’t be retained by the object you are listening (it uses a WeakReference to the listener and automatically remove it when the reference become null). It may be useful when you want to add a listener to an object that you won’t be able to remove later (the listener), avoiding retaining your listener (and attached object) in memory.
Best,
– Stephane
The forum ‘Development’ is closed to new topics and replies.