@Override
    public @NotNull String clipText(@NotNull SimpleColoredComponent component,
                                    @NotNull Graphics2D g,
                                    int fragmentIndex,
                                    @NotNull String text,
                                    int availTextWidth) {
      return SwingUtilities2.clipStringIfNecessary(component, component.getFontMetrics(g.getFont()), text, availTextWidth);
    }
@Override
    public @NotNull String clipText(@NotNull SimpleColoredComponent component,
                                    @NotNull Graphics2D g,
                                    int fragmentIndex,
                                    @NotNull String text,
                                    int availTextWidth)