code: protected HorizontalLayout buildTitleLayout() {
          titleLayout = new HorizontalLayout();
          titleLayout.addStyleName(SPUIStyleDefinitions.WIDGET_TITLE);
          titleLayout.setSpacing(false);
          titleLayout.setMargin(false);
          titleLayout.setSizeFull();
          titleLayout.addComponent(title);
          titleLayout.setComponentAlignment(title, Alignment.TOP_LEFT);
          titleLayout.setExpandRatio(title, 0.8F);
  
          if (hasHeaderMaximizeSupport()) {
              titleLayout.addComponents(getHeaderMaximizeSupport().maxMinButton);
              titleLayout.setComponentAlignment(getHeaderMaximizeSupport().maxMinButton, Alignment.TOP_RIGHT);
              titleLayout.setExpandRatio(getHeaderMaximizeSupport().maxMinButton, 0.2F);
          }
  
          return titleLayout;
      }
docs: Builds the title layout.
  
  @return title-layout