/* package */int[] getGroupsInfoAt(int index) { return getGroupsInfoAt(index, false); }
/* package */Listgroup getListgroupAt(int index) { if (_groupsInfo.isEmpty()) return null; final int[] g = getGroupsInfoAt(index); if (g != null) { return (Listgroup) getItemAtIndex(g[0]); } return null; }
/** * Returns the index of Listgroupfoot * <p> -1: no Listgroupfoot */ public int getListgroupfootIndex() { final Listbox lb = (Listbox) getParent(); if (lb != null) { int[] g = lb.getGroupsInfoAt(getIndex(), true); if (g != null) return g[2]; } return -1; }
/** Returns the number of items. */ public int getItemCount() { final Listbox lb = getListbox(); if (lb != null) { int[] g = lb.getGroupsInfoAt(getIndex(), true); if (g != null) { if (g[2] == -1) return g[1] - 1; else return g[1] - 2; } } return 0; }
final int[] g = getGroupsInfoAt(index); if (g != null) { g[1]++;
if (isReorder) { final int idx = ((Listgroupfoot) newChild).getIndex(); final int[] ginfo = getGroupsInfoAt(idx); if (ginfo != null) { ginfo[1]--; } else if (refChild instanceof Listitem) { final int idx = ((Listitem) refChild).getIndex(); final int[] g = getGroupsInfoAt(idx); if (g == null) throw new UiException("Listgroupfoot cannot exist alone, you have to add a Listgroup first"); if (isReorder) { final int nindex = ((Listgroupfoot) newChild).getIndex(); final int[] ginfo = getGroupsInfoAt(nindex); if (ginfo != null) { ginfo[1]--; final int[] g = getGroupsInfoAt(idx, preRefChild instanceof Listgroup); if (g == null) throw new UiException("Listgroupfoot cannot exist alone, you have to add a Listgroup first"); if (isReorder) { final int nindex = ((Listgroupfoot) newChild).getIndex(); final int[] ginfo = getGroupsInfoAt(nindex); if (ginfo != null) { ginfo[1]--;
final int[] g = getGroupsInfoAt(index); if (g != null) { g[1]--; final int[] g1 = getGroupsInfoAt(index); if (g1 != null) g1[2] = -1;