use of com.codename1.ui.list.ContainerList in project CodenameOne by codenameone.
the class ComponentTreeModel method getIndexOfChild.
public int getIndexOfChild(Object parent, Object child) {
Component cmp = (Component) parent;
Component chd = (Component) child;
if (cmp instanceof List || cmp instanceof ContainerList) {
if (chd.hasFocus()) {
return 1;
}
return 0;
}
if (cmp instanceof Container) {
return ((Container) cmp).getComponentIndex(chd);
}
return -1;
}
Aggregations