int (@NotNull Graphics g, @Nullable Color backColor, int width, @NotNull Point position, @NotNull Color defaultBackground, @NotNull Rectangle clip) { if (backColor != null && !backColor.equals(defaultBackground) && clip.intersects(position.x, position.y, width, getLineHeight())) { if (backColor.equals(myLastBackgroundColor) && myLastBackgroundPosition.y == position.y && myLastBackgroundPosition.x + myLastBackgroundWidth == position.x) { myLastBackgroundWidth += width; } else { flushBackground(g, clip); myLastBackgroundColor = backColor; myLastBackgroundPosition = new Point(position); myLastBackgroundWidth = width; } } return position.x + width; }