WindowManager listener
Posted by Patrick Pirrotte on Jul 13, 2006; 3:29pm
URL: http://imagej.273.s1.nabble.com/WindowManager-listener-tp3702180.html
Dear list,
I'm currently writing a little plugin which should update its GUI depending
on the context i.e. on the selected image. I thought of getting the list of
open windows through WindowManager.getIDList() and attach a Listener to each
ImageWindow separately. This works fine until a new ImageWindow is created,
for which of course there is no listener attached. Basically, what I would
need is for a way to register a listener to WindowManager which would fire
an event as soon as the list of ImageWindow changes and tell me to update my
list of Listeners on the individual ImageWindows. But maybe there's another
solution? Does somebody have a clue on how to solve this problem (besides
modifying the WindowManager itself)?
By the way, this could be very useful if ImageJ is to support contextual
menus.
Many thanks,
Patrick Pirrotte