@Override
      public void layoutContainer(Container parent) {
        Dimension baseSize = myBaseComponent.getPreferredSize();
        int baseComponentBaseline = myBaseComponent.getBaseline(baseSize.width, baseSize.height);
        int top = parent.getInsets().top;
        int y = Math.max(top + baseComponentBaseline, getMinButtonsBaseline());

        if (!leftOrder) {
          layoutRightOrderContainer(parent, y, baseComponentBaseline);
          return;
        }

        int x = 0;
        int calcBaseWidth = calculateBaseWidth(parent);

        if (myBaseComponent instanceof JLabel label) {
          label.setToolTipText(calcBaseWidth < baseSize.width ? label.getText() : null);
        }

        baseSize.width = Math.min(baseSize.width, calcBaseWidth);
        myBaseComponent.setBounds(x, y - baseComponentBaseline, baseSize.width, baseSize.height);

        if (myProgressComponent != null) {
          Dimension size = myProgressComponent.getPreferredSize();
          setBaselineBounds(parent.getWidth() - size.width, y, myProgressComponent, size);
          return;
        }

        int lastX = parent.getWidth();

        for (int i = myButtonComponents.size() - 1; i >= 0; i--) {
          Component component = myButtonComponents.get(i);
          if (!component.isVisible()) {
            continue;
          }
          Dimension size = component.getPreferredSize();
          lastX -= size.width;
          setBaselineBounds(lastX, y - myYOffset, component, size);
          lastX -= myButtonOffset.get();
        }
      }
@Override
      public void layoutContainer(Container parent)