From: BobHanson Date: Thu, 11 Jun 2020 13:37:11 +0000 (-0500) Subject: JAL-3446 misplaced } removed drop and window listeners from JS X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8ef4f0d1832bd4cf56c33eff8f822b233e84f3f1;p=jalview.git JAL-3446 misplaced } removed drop and window listeners from JS --- diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 7a3f238..a13a38b 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -530,41 +530,40 @@ public class Desktop extends GDesktop } }); } + } + this.setDropTarget(new java.awt.dnd.DropTarget(desktopPane, this)); - this.setDropTarget(new java.awt.dnd.DropTarget(desktopPane, this)); - - this.addWindowListener(new WindowAdapter() + this.addWindowListener(new WindowAdapter() + { + @Override + public void windowClosing(WindowEvent evt) { - @Override - public void windowClosing(WindowEvent evt) - { - quit(); - } - }); + quit(); + } + }); - MouseAdapter ma; - this.addMouseListener(ma = new MouseAdapter() + MouseAdapter ma; + this.addMouseListener(ma = new MouseAdapter() + { + @Override + public void mousePressed(MouseEvent evt) { - @Override - public void mousePressed(MouseEvent evt) + if (evt.isPopupTrigger()) // Mac { - if (evt.isPopupTrigger()) // Mac - { - showPasteMenu(evt.getX(), evt.getY()); - } + showPasteMenu(evt.getX(), evt.getY()); } + } - @Override - public void mouseReleased(MouseEvent evt) + @Override + public void mouseReleased(MouseEvent evt) + { + if (evt.isPopupTrigger()) // Windows { - if (evt.isPopupTrigger()) // Windows - { - showPasteMenu(evt.getX(), evt.getY()); - } + showPasteMenu(evt.getX(), evt.getY()); } - }); - desktopPane.addMouseListener(ma); - } + } + }); + desktopPane.addMouseListener(ma); } catch (Throwable t) { t.printStackTrace();