diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 563:5bbe53b47d0a

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 03 Feb 2020 15:19:30 +0900
parents 87ae979b88cd
children e93a8058344d
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Sun Feb 02 19:58:17 2020 +0900
+++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java	Mon Feb 03 15:19:30 2020 +0900
@@ -523,12 +523,10 @@
         GraphicsDevice[] gs = ge.getScreenDevices();
 
         for (GraphicsDevice gd : gs) {
-            int screenNumber = 0;
             for (GraphicsConfiguration r : gd.getConfigurations()) {
                 Rectangle rect = r.getBounds();
-                //System.out.println("screen "+ screenNumber +":"+rect);
+                //System.out.println("screen "+ rectangles.length() +":"+rect);
                 rectangles.add(rect);
-                screenNumber++;
             }
         }
         Point offset = getScreenOffset(rectangles);
@@ -542,12 +540,7 @@
             screenNumber++;
         }
 
-        fbRectangles.sort(new Comparator<FbRectangle>() {
-            @Override
-            public int compare(FbRectangle t0, FbRectangle t1) {
-                return t0.getX() < t1.getX() ? -1 : t0.getX() == t1.getX() ? 0 : 1;
-            }
-        });
+        fbRectangles.sort((t0, t1) -> t0.getX() < t1.getX() ? -1 : t0.getX() == t1.getX() ? 0 : 1);
 
         int retinaOffsetX = 0;
         FbRectangle fbRectanglesPrev = fbRectangles.get(0);
@@ -563,12 +556,7 @@
             fbRectanglesPrev = fbRect;
         }
 
-        fbRectangles.sort(new Comparator<FbRectangle>() {
-            @Override
-            public int compare(FbRectangle t0, FbRectangle t1) {
-                return t0.getY() < t1.getY() ? -1 : t0.getY() == t1.getY() ? 0 : 1;
-            }
-        });
+        fbRectangles.sort((t0, t1) -> t0.getY() < t1.getY() ? -1 : t0.getY() == t1.getY() ? 0 : 1);
 
         int retinaOffsetY = 0;
         fbRectanglesPrev = fbRectangles.get(0);