Re: Notification of File Save
Posted by
Albert Cardona-2 on
Dec 23, 2020; 10:02pm
URL: http://imagej.273.s1.nabble.com/Notification-of-File-Save-tp5024300p5024305.html
Best would be a default interface method imageSaved that does nothing, added to ij.ImageListener. Wouldn’t break anything and it’s supported since at least java 8.
Albert
> On Dec 23, 2020, at 9:21 PM, Kenneth Sloan <
[hidden email]> wrote:
>
> Is it possible to squeeze this functionality into "ImageUpdated"? Perhaps add calls to ImagePlus to ask about the nature of the update? This would not break existing code, I think.
> --
> Kenneth Sloan
>
[hidden email]
> Vision is the art of seeing what is invisible to others.
>
>
>
>
>>
>> Unfortunately, I think that your suggestion of adding additional callbacks to ImagePlus does not work: The ImageListener of ImagePlus cannot be extended because its callback functions are not something like imageOperationDone(image, whatOperation) but the notifyListeners has separate
>> imageOpened,
>> imageClosed, and
>> imageUpdated
>> calls to the listener. One can't add more without breaking compatibility with existing plugins.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html