コード例 #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
ファイル: AnimationService.java プロジェクト: Jondeen/imagej
 /** 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
ファイル: ShadowsDemo.java プロジェクト: physion/imagej
 @EventHandler
 protected void onEvent(final DisplayDeletedEvent event) {
   if (event.getObject() == display) userHasQuit = true;
 }