code: protected void layoutLabel(SeaGlassContext ss, int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon,
              Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected) {
          View v = getTextViewForTab(tabIndex);
  
          if (v != null) {
              tabPane.putClientProperty("html", v);
          }
  
          textRect.x = textRect.y = iconRect.x = iconRect.y = 0;
  
          ss.getStyle().getGraphicsUtils(ss).layoutText(ss, metrics, title, icon, SwingUtilities.CENTER, SwingUtilities.CENTER,
                                                        SwingUtilities.LEADING, SwingUtilities.TRAILING, tabRect, iconRect, textRect,
                                                        textIconGap);
  
          tabPane.putClientProperty("html", null);
  
          int xNudge = getTabLabelShiftX(tabPlacement, tabIndex, isSelected);
          int yNudge = getTabLabelShiftY(tabPlacement, tabIndex, isSelected);
  
          iconRect.x += xNudge;
          iconRect.y += yNudge;
          textRect.x += xNudge;
          textRect.y += yNudge;
      }
docs: Layout label text for a tab.
  
  @param ss           the SynthContext.
  @param tabPlacement the side the tabs are on.
  @param metrics      the font metrics.
  @param tabIndex     the index of the tab to lay out.
  @param title        the text for the label, if any.
  @param icon         the icon for the label, if any.
  @param tabRect      Rectangle to layout text and icon in.
  @param iconRect     Rectangle to place icon bounds in
  @param textRect     Rectangle to place text in
  @param isSelected   is the tab selected?