void (Graphics2D g2, int fragmentIndex, float x, float y) { String clippedText = myFragmentTextClipper.clipText(myComponent, g2, fragmentIndex, myText, myComponent.getWidth() - (int)x); g2.drawString(clippedText, x, y); }