示例#1
0
  @EventHandler
  protected void onEvent(final DisplayDeletedEvent event) {

    /* OLD COMMENT : no longer relevant except for testing purposes
    // Need to make sure:
    // - modern IJ Windows always close when legacy IJ close expected
    // Stack to Images, Split Channels, etc.
    // - No ImagePlus/Display mapping becomes a zombie in the
    // LegacyImageMap failing to get garbage collected.
    // - That modern IJ does not think legacy IJ initiated the ij1.close()
     */
    if (event.getObject() instanceof ImageDisplay) {
      unregisterDisplay((ImageDisplay) event.getObject());
    }
  }
示例#2
0
 /** Stops animation if display has been deleted. */
 @EventHandler
 protected void onEvent(final DisplayDeletedEvent event) {
   final ImageDisplay imageDisplay = toImageDisplay(event.getObject());
   if (imageDisplay == null) return;
   stop(imageDisplay);
   animations.remove(imageDisplay);
 }
示例#3
0
 @EventHandler
 protected void onEvent(final DisplayDeletedEvent event) {
   if (event.getObject() == display) userHasQuit = true;
 }