private static void adjustFromRight(SizeRequirements reqs, int baseline,
private static void adjustFromRight(SizeRequirements reqs, float baseline,
  private static void adjustFromRight(SizeRequirements reqs, int baseline,                                      int allocated, int[] spanAndOffset)  {    float right = allocated - baseline;    // If the resulting span exceeds the maximum of the component, then adjust    // accordingly.    float maxRight = ((float) reqs.maximum) * (1.F - reqs.alignment);    if (right / (1.F - reqs.alignment) > reqs.maximum)      right = maxRight;    // If we have not enough space on the left side, then adjust accordingly.    if (right / (1.F - reqs.alignment) * reqs.alignment > allocated - baseline)      right = ((float) (allocated - baseline))             / reqs.alignment * (1.F - reqs.alignment);    // If we are below the minimum, then adjust upwards.      float minRight = ((float) reqs.minimum) * (1.F - reqs.alignment);    if (right / (1.F - reqs.alignment) < reqs.minimum)      right = Math.max(minRight, maxRight);    spanAndOffset[0] = (int) (right / (1.F - reqs.alignment));    spanAndOffset[1] = baseline -                       (int) (((float) spanAndOffset[0]) * reqs.alignment);  }