MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / loopAnimations

Method loopAnimations

CodenameOne/src/com/codename1/ui/Form.java:2288–2315  ·  view source on GitHub ↗
(ArrayList<Animation> v, ArrayList<Animation> notIn)

Source from the content-addressed store, hash-verified

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 ///

Callers 1

repaintAnimationsMethod · 0.95

Calls 12

animateMethod · 0.95
getSizeMethod · 0.95
getXMethod · 0.95
getYMethod · 0.95
getWidthMethod · 0.95
getHeightMethod · 0.95
getInstanceMethod · 0.95
getDirtyRegionMethod · 0.80
sizeMethod · 0.65
getMethod · 0.65
containsMethod · 0.65
repaintMethod · 0.65

Tested by

no test coverage detected