Skip to content

Commit

Permalink
Colocalisation_Test: simplify WindowListener code
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Aug 27, 2024
1 parent 4461217 commit c96419e
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/main/java/sc/fiji/coloc/Colocalisation_Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import ij.text.TextWindow;

import java.awt.Rectangle;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.text.DecimalFormat;

public class Colocalisation_Test implements PlugIn
Expand Down Expand Up @@ -706,24 +706,11 @@ public void correlate(ImagePlus imp1, ImagePlus imp2, ImagePlus imp3)
if (textWindow == null) {
textWindow = new TextWindow("Results",
Headings2, str, 400, 250);
textWindow.addWindowListener(new WindowListener() {
textWindow.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent arg0) {
textWindow = null;
}

@Override
public void windowActivated(WindowEvent arg0) {}
@Override
public void windowClosing(WindowEvent arg0) {}
@Override
public void windowDeactivated(WindowEvent arg0) {}
@Override
public void windowDeiconified(WindowEvent arg0) {}
@Override
public void windowIconified(WindowEvent arg0) {}
@Override
public void windowOpened(WindowEvent arg0) {}
});
} else {
textWindow.getTextPanel().setColumnHeadings(Headings2);
Expand Down

0 comments on commit c96419e

Please sign in to comment.