Changeset 18932 in josm for trunk/src/org
- Timestamp:
- 2024-01-01T12:58:39+01:00 (11 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/animation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/animation/ChristmasExtension.java
r18929 r18932 15 15 public class ChristmasExtension implements AnimationExtension { 16 16 17 private static final Random seed = new Random(); 17 18 private final List<IAnimObject> objs = new ArrayList<>(50); 18 19 … … 29 30 @Override 30 31 public final void adjustForSize(int w, int h) { 31 Random seed = new Random();32 32 int count = w / (2 * (Star.averageStarWidth + 1)); 33 33 while (objs.size() > count) { -
trunk/src/org/openstreetmap/josm/gui/animation/DropImage.java
r18931 r18932 75 75 dirs.add(new File(url.toURI())); 76 76 do { 77 for (File f : dirs.remove(0).listFiles()) { 78 if (f.isFile()) { 79 result.add(f.getPath()); 80 } else { 81 dirs.add(f); 77 File[] files = dirs.remove(0).listFiles(); 78 if (files != null) { 79 for (File f : files) { 80 if (f.isFile()) { 81 result.add(f.getPath()); 82 } else { 83 dirs.add(f); 84 } 82 85 } 83 86 } … … 97 100 name = result.get(seed.nextInt(result.size())); 98 101 } 102 return new ImageProvider(name).setMaxSize(new Dimension(size, size)).get().getImage(); 99 103 } catch (Exception ex) { 100 104 Logging.log(Logging.LEVEL_DEBUG, ex); 101 105 } 102 return new ImageProvider( name).setMaxSize(new Dimension(size, size)).get().getImage();106 return new ImageProvider("logo").setMaxSize(new Dimension(size, size)).get().getImage(); 103 107 } 104 108 }
Note:
See TracChangeset
for help on using the changeset viewer.