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

Method contains

CodenameOne/src/com/codename1/ui/Container.java:2614–2626  ·  view source on GitHub ↗
(Component cmp)

Source from the content-addressed store, hash-verified

2612 ///
2613 /// true if this Component contains in this Container
2614 public boolean contains(Component cmp) {
2615 if (cmp == null) {
2616 return false;
2617 }
2618 cmp = cmp.getParent();
2619 while (cmp != null) {
2620 if (cmp == this) { //NOPMD CompareObjectsWithEquals
2621 return true;
2622 }
2623 cmp = cmp.getParent();
2624 }
2625 return false;
2626 }
2627
2628 /// Makes sure the component is visible in the scroll if this container is
2629 /// scrollable

Callers 15

revalidateLaterMethod · 0.95
setSurfaceMethod · 0.95
replaceComponentsMethod · 0.95
removeAllMethod · 0.95
moveScrollTowardsMethod · 0.95
getResponderAtMethod · 0.95
getComponentAtMethod · 0.95
isOwnedByMethod · 0.95
updateHoverStateMethod · 0.95
startMethod · 0.95

Calls 1

getParentMethod · 0.65