Changeset 6104 in josm for trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
- Timestamp:
- 2013-08-03T00:12:29+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
r6087 r6104 296 296 .getLocalGraphicsEnvironment(); 297 297 GraphicsDevice[] gs = ge.getScreenDevices(); 298 for (int j = 0; j < gs.length; j++) { 299 GraphicsDevice gd = gs[j]; 298 for (GraphicsDevice gd : gs) { 300 299 if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) { 301 300 virtualBounds = virtualBounds.union(gd.getDefaultConfiguration().getBounds()); … … 346 345 int intersect = 0; 347 346 Rectangle bounds = null; 348 for (int j = 0; j < gs.length; j++) { 349 GraphicsDevice gd = gs[j]; 347 for (GraphicsDevice gd : gs) { 350 348 if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) { 351 349 Rectangle b = gd.getDefaultConfiguration().getBounds(); 352 if (b.height > 0 && b.width/b.height >= 3) /* multiscreen with wrong definition */ 353 { 350 if (b.height > 0 && b.width / b.height >= 3) /* multiscreen with wrong definition */ { 354 351 b.width /= 2; 355 352 Rectangle is = b.intersection(g); 356 int s = is.width *is.height;357 if (bounds == null || intersect < s) {353 int s = is.width * is.height; 354 if (bounds == null || intersect < s) { 358 355 intersect = s; 359 356 bounds = b; … … 362 359 b.x += b.width; 363 360 is = b.intersection(g); 364 s = is.width *is.height;365 if (bounds == null || intersect < s) {361 s = is.width * is.height; 362 if (bounds == null || intersect < s) { 366 363 intersect = s; 367 364 bounds = b; 368 365 } 369 } 370 else 371 { 366 } else { 372 367 Rectangle is = b.intersection(g); 373 int s = is.width *is.height;374 if (bounds == null || intersect < s) {368 int s = is.width * is.height; 369 if (bounds == null || intersect < s) { 375 370 intersect = s; 376 371 bounds = b;
Note:
See TracChangeset
for help on using the changeset viewer.