private static void setCompWrapBounds(ContainerWrapper parent, int[] allSizes, ArrayList<CompWrap> compWraps, UnitValue rowAlign, int start, int size, boolean isHor, boolean fromEnd)
{
int totSize = LayoutUtil.sum(allSizes);
CC cc = compWraps.get(0).cc;
UnitValue align = correctAlign(cc, rowAlign, isHor, fromEnd);
int cSt = start;
int slack = size - totSize;
if (slack > 0 && align != null) {
int al = Math.min(slack, Math.max(0, align.getPixels(slack, parent, null)));
cSt += (fromEnd ? -al : al);
}
for (int i = 0, bIx = 0, iSz = compWraps.size(); i < iSz; i++) {
CompWrap cw = compWraps.get(i);
if (fromEnd ) {
cSt -= allSizes[bIx++];
cw.setDimBounds(cSt - allSizes[bIx], allSizes[bIx], isHor);
cSt -= allSizes[bIx++];
} else {
cSt += allSizes[bIx++];
cw.setDimBounds(cSt, allSizes[bIx], isHor);
cSt += allSizes[bIx++];
}
}
}