int sumDelta = 0;
long sumDelta = 0;
  private static void adjustGreater(int allocated, SizeRequirements[] children,                                    int[] spans, int span)  {    // Sum up (maxSize - prefSize) over all children    int sumDelta = 0;    for (int i = 0; i < children.length; i++)      {      sumDelta += children[i].maximum - children[i].preferred;        if (sumDelta < 0)          sumDelta = Integer.MAX_VALUE;      }    // If we have sumDelta == 0, then all components have prefSize == maxSize    // and we can't do anything about it.    if (sumDelta == 0)      return;    // Adjust all sizes according to their preferred and minimum sizes.    for (int i = 0; i < children.length; i++)      {        double factor = ((double) (children[i].maximum - children[i].preferred))                        / ((double) sumDelta);        spans[i] -= factor * (span - allocated);      }  }