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

Method revalidateLater

CodenameOne/src/com/codename1/ui/Form.java:334–356  ·  view source on GitHub ↗
(Container cnt)

Source from the content-addressed store, hash-verified

332 ///
333 /// - `cnt`: The container to schedule for revalidation
334 void revalidateLater(Container cnt) {
335 if (!pendingRevalidateQueue.contains(cnt)) {
336 // It doesn't need to be in queue more than once.
337 Iterator<Container> it = pendingRevalidateQueue.iterator();
338
339 // Iterate through the existing queue to make sure that this container
340 // isn't already scheduled to be revalidated.
341 while (it.hasNext()) {
342 Container existing = it.next();
343 if (existing.contains(cnt)) {
344 // cnt is already in a container that is scheduled for revalidation
345 // we don't need to add it.
346 return;
347 } else if (cnt.contains(existing)) {
348 // cnt is the parent of this container. Remove the existing container
349 // as it will be covered by a revalidate of cnt
350 it.remove();
351 }
352
353 }
354 pendingRevalidateQueue.add(cnt);
355 }
356 }
357
358 /// Removes a container from the revalidation queue. This is called from
359 /// `Container#revalidate()`.

Callers 9

runMethod · 0.95
setFocusedMethod · 0.95
actionPerformedMethod · 0.95
removePopupMethod · 0.95
actionPerformedMethod · 0.95
revalidateLaterMethod · 0.95
initTitleBarStatusMethod · 0.45
setTitleMethod · 0.45

Calls 7

containsMethod · 0.95
containsMethod · 0.65
iteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
removeMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected