/*package*/ void fixGroupIndex(int j, int to, boolean infront) { int realj = getRealIndex(j); if (realj < 0) { realj = 0; } if (realj < getChildren().size()) { final int beginning = j; for (Iterator<Component> it = getChildren().listIterator(realj); it.hasNext() && (to < 0 || j <= to); ++j) { Component o = it.next(); ((Row) o).setIndexDirectly(j); if (_isReplacingRow) //@see Grid.Renderer#render break; //set only the first Row, skip handling GroupInfo // if beginning is a group, we don't need to change its groupInfo, // because // it is not reliable when infront is true. if ((!infront || beginning != j) && o instanceof Group) { int[] g = getLastGroupsInfoAt(j + (infront ? -1 : 1)); if (g != null) { g[0] = j; if (g[2] != -1) g[2] += (infront ? 1 : -1); } } } } }