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