Changeset 6104 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2013-08-03T00:12:29+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/FallbackDateParser.java
r3719 r6104 43 43 // Build a list of candidate date parsers. 44 44 dateParsers = new ArrayList<DateFormat>(formats.length); 45 for ( int i = 0; i < formats.length; i++) {46 dateParsers.add(new SimpleDateFormat(format s[i]));45 for (String format : formats) { 46 dateParsers.add(new SimpleDateFormat(format)); 47 47 } 48 48 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r6103 r6104 281 281 if( path.exists() ) { 282 282 File[] files = path.listFiles(); 283 for(int i=0; i<files.length; i++) { 284 if(files[i].isDirectory()) { 285 deleteDirectory(files[i]); 286 } 287 else { 288 files[i].delete(); 283 for (File file : files) { 284 if (file.isDirectory()) { 285 deleteDirectory(file); 286 } else { 287 file.delete(); 289 288 } 290 289 } -
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.