/*package*/ int[] getGroupsInfoAt(int index) { return getGroupsInfoAt(index, false); }
/*package*/ Group getGroup(int index) { if (_groupsInfo.isEmpty()) return null; final int[] g = getGroupsInfoAt(index); if (g != null) { final int realIndex = getRealIndex(g[0]); //if realIndex < 0 means g is half loaded, Group head is not in server if (realIndex >= 0 && realIndex < getChildren().size()) { Row row = (Row) getChildren().get(realIndex); return (Group) row; } } return null; }
/** * Returns the index of Groupfoot * <p> -1: no Groupfoot */ public int getGroupfootIndex() { final Rows rows = (Rows) getParent(); if (rows != null) { int[] g = rows.getGroupsInfoAt(getIndex(), true); if (g != null) return g[2]; } return -1; }
/** Returns the number of items. */ public int getItemCount() { final Rows rows = (Rows) getParent(); if (rows != null) { int[] g = rows.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 = newItem.getIndex(); final int[] ginfo = getGroupsInfoAt(idx); if (ginfo != null) { ginfo[1]--; } else { final int idx = ((Row) refChild).getIndex(); final int[] g = getGroupsInfoAt(idx); if (g == null) throw new UiException("Groupfoot cannot exist alone, you have to add a Group first"); if (isReorder) { final int nindex = newItem.getIndex(); final int[] ginfo = getGroupsInfoAt(nindex); if (ginfo != null) { ginfo[1]--;
final int[] g = getGroupsInfoAt(index); if (g != null) { g[1]--; fixGroupIndex(index, -1, false); if (child instanceof Groupfoot) { final int[] g1 = getGroupsInfoAt(index); if (g1 != null) { // group info maybe remove cause of grouphead removed in previous op g1[2] = -1;