(ArrayList<Animation> v, ArrayList<Animation> notIn)
| 2286 | } |
| 2287 | |
| 2288 | private void loopAnimations(ArrayList<Animation> v, ArrayList<Animation> notIn) { |
| 2289 | // we don't save size() in a varible since the animate method may deregister |
| 2290 | // the animation thus invalidating the size |
| 2291 | for (int iter = 0; iter < v.size(); iter++) { // NOPMD ForLoopCanBeForeach |
| 2292 | Animation c = v.get(iter); |
| 2293 | if (c == null || notIn != null && notIn.contains(c)) { |
| 2294 | continue; |
| 2295 | } |
| 2296 | if (c.animate()) { |
| 2297 | if (c instanceof Component) { |
| 2298 | Rectangle rect = ((Component) c).getDirtyRegion(); |
| 2299 | if (rect != null) { |
| 2300 | Dimension d = rect.getSize(); |
| 2301 | |
| 2302 | // this probably can't happen but we got a really weird partial stack trace to this |
| 2303 | // method and this check doesn't hurt |
| 2304 | if (d != null) { |
| 2305 | ((Component) c).repaint(rect.getX(), rect.getY(), d.getWidth(), d.getHeight()); |
| 2306 | } |
| 2307 | } else { |
| 2308 | ((Component) c).repaint(); |
| 2309 | } |
| 2310 | } else { |
| 2311 | Display.getInstance().repaint(c); |
| 2312 | } |
| 2313 | } |
| 2314 | } |
| 2315 | } |
| 2316 | |
| 2317 | /// If this method returns true the EDT won't go to sleep indefinitely |
| 2318 | /// |
no test coverage detected