code: public int getWidth(int y)
      {
          int maxx = 0;
          for (int i = 0; i < size(); i++)
          {
              Box box = getBox(i);
              if (box.getBounds().y <= y &&
                  box.getBounds().y + box.getBounds().height > y)
              {
                  int wx = box.getBounds().x + box.getBounds().width;
                  if (wx > maxx) maxx = wx;
              }
          }
          return maxx;
      }
docs: Gets the total width of the floating boxes in some point.
  @param y the Y coordinate of the point
  @return the total width of the floating boxes on that Y coordinate