JAL-3446 misplaced } removed drop and window listeners from JS
authorBobHanson <hansonr@stolaf.edu>
Thu, 11 Jun 2020 13:37:11 +0000 (08:37 -0500)
committerBobHanson <hansonr@stolaf.edu>
Thu, 11 Jun 2020 13:37:11 +0000 (08:37 -0500)
src/jalview/gui/Desktop.java

index 7a3f238..a13a38b 100644 (file)
@@ -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();