Changeset 18930 in josm
- Timestamp:
- 2023-12-31T20:54:02+01:00 (12 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/animation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/animation/DropImage.java
r18929 r18930 20 20 /** 21 21 * A random image displayed when {@link ChristmasExtension} is active. 22 * @since xxx22 * @since 18929 23 23 */ 24 24 class DropImage implements IAnimObject { … … 74 74 ArrayList<File> dirs = new ArrayList<File>(); 75 75 dirs.add(new File(url.toURI())); 76 do 77 { 78 for(File f : dirs.remove(0).listFiles()) { 79 if(f.isFile()) { 76 do { 77 for (File f : dirs.remove(0).listFiles()) { 78 if (f.isFile()) { 80 79 result.add(f.getPath()); 81 80 } else { … … 83 82 } 84 83 } 85 } while (dirs.size() > 0);84 } while (dirs.size() > 0); 86 85 name = result.get(seed.nextInt(result.size())); 87 86 } else if (url != null && url.getProtocol().equals("jar")) { … … 89 88 JarFile jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8")); 90 89 Enumeration<JarEntry> entries = jar.entries(); 91 while (entries.hasMoreElements()) {90 while (entries.hasMoreElements()) { 92 91 String fileName = entries.nextElement().getName(); 93 if (fileName.startsWith(path) && !fileName.endsWith("/")) {92 if (fileName.startsWith(path) && !fileName.endsWith("/")) { 94 93 result.add(fileName.substring(7)); 95 94 } -
trunk/src/org/openstreetmap/josm/gui/animation/IAnimObject.java
r18929 r18930 6 6 /** 7 7 * An animated object 8 * @since xxx8 * @since 18929 9 9 */ 10 10 public interface IAnimObject { 11 11 12 public void paint(Graphics g); 12 /** Paint the object 13 * @param g the graphics object to paint to 14 */ 15 void paint(Graphics g); 13 16 14 public void setExtend(int w, int h); 17 /** Set the extend when window size changed 18 * @param w window width 19 * @param h window height 20 */ 21 void setExtend(int w, int h); 15 22 16 public void animate(); 23 /** Animate the object - Cause next step of animation 24 */ 25 void animate(); 17 26 }
Note:
See TracChangeset
for help on using the changeset viewer.