class MinimizedPanel extends JPanel implements SideModel.Listener<T> {

  @Override
  public void modelChanged(@NotNull SideModel<T> model, @NotNull SideModel.EventType unused) {
    removeAll();
    myHasVisibleButtons = false;
    model.getTopTools(mySide).forEach(this::addButton);
    add(myFiller);
    model.getBottomTools(mySide).forEach(this::addButton);
    setVisible(myHasVisibleButtons);
    revalidate();
    repaint();
  }

    MinimizedPanel(@NotNull Side side, @NotNull SideModel<T> model);

}