SizeRequirements[] childReqs = getChildRequirements(axis); return SizeRequirements.getAlignedSizeRequirements(childReqs);
updateChildRequirements(axis);  SizeRequirements res = sr; if (res == null) res = new SizeRequirements();  float minLeft = 0; float minRight = 0; float prefLeft = 0; float prefRight = 0; float maxLeft = 0; float maxRight = 0; for (int i = 0; i < childReqs[axis].length; i++) { float myMinLeft = childReqs[axis][i].minimum * childReqs[axis][i].alignment; float myMinRight = childReqs[axis][i].minimum - myMinLeft; minLeft = Math.max(myMinLeft, minLeft); minRight = Math.max(myMinRight, minRight); float myPrefLeft = childReqs[axis][i].preferred * childReqs[axis][i].alignment; float myPrefRight = childReqs[axis][i].preferred - myPrefLeft; prefLeft = Math.max(myPrefLeft, prefLeft); prefRight = Math.max(myPrefRight, prefRight); float myMaxLeft = childReqs[axis][i].maximum * childReqs[axis][i].alignment; float myMaxRight = childReqs[axis][i].maximum - myMaxLeft; maxLeft = Math.max(myMaxLeft, maxLeft); maxRight = Math.max(myMaxRight, maxRight); } int minSize = (int) (minLeft + minRight); int prefSize = (int) (prefLeft + prefRight); int maxSize = (int) (maxLeft + maxRight); float align = prefLeft / (prefRight + prefLeft); if (Float.isNaN(align)) align = 0;  res.alignment = align; res.maximum = maxSize; res.preferred = prefSize; res.minimum = minSize; return res;
  protected SizeRequirements calculateMinorAxisRequirements(int axis,                                                           SizeRequirements sr)  {    SizeRequirements[] childReqs = getChildRequirements(axis);    return SizeRequirements.getAlignedSizeRequirements(childReqs);  }