int (@NotNull Graphics g, CharSequence text, int start, int end, int x, int y, @Nullable Color effectColor, EffectType effectType, @JdkConstants.FontStyle int fontType, Color fontColor, @NotNull final Rectangle clip, WhitespacePaintingStrategy context) { int xStart = x; for (int i = start; i < end; i++) { if (text.charAt(i) != '\t') continue; x = drawTablessString(text, start, i, g, x, y, fontType, fontColor, clip, context); int x1 = EditorUtil.nextTabStop(x, this); drawTabPlacer(g, y, x, x1, i, context); x = x1; start = i + 1; } x = drawTablessString(text, start, end, g, x, y, fontType, fontColor, clip, context); if (effectColor != null) { final Color savedColor = g.getColor(); // myBorderEffect.flushIfCantProlong(g, this, effectType, effectColor); int xEnd = x; if (xStart < clip.x && xEnd < clip.x || xStart > clip.x + clip.width && xEnd > clip.x + clip.width) { return x; } if (xEnd > clip.x + clip.width) { xEnd = clip.x + clip.width; } if (xStart < clip.x) { xStart = clip.x; } if (effectType == EffectType.LINE_UNDERSCORE) { g.setColor(effectColor); UIUtil.drawLine(g, xStart, y + 1, xEnd, y + 1); g.setColor(savedColor); } else if (effectType == EffectType.BOLD_LINE_UNDERSCORE) { g.setColor(effectColor); drawBoldLineUnderScore(g, xStart, y, xEnd - xStart); g.setColor(savedColor); } else if (effectType == EffectType.STRIKEOUT) { g.setColor(effectColor); int y1 = y - getCharHeight() / 2; UIUtil.drawLine(g, xStart, y1, xEnd, y1); g.setColor(savedColor); } else if (effectType == EffectType.WAVE_UNDERSCORE) { g.setColor(effectColor); UIUtil.drawWave((Graphics2D)g, new Rectangle(xStart, y + 1, xEnd - xStart, getDescent() - 1)); g.setColor(savedColor); } else if (effectType == EffectType.BOLD_DOTTED_LINE) { final Color bgColor = getBackgroundColor(); final int dottedAt = SystemInfo.isMac ? y : y + 1; UIUtil.drawBoldDottedLine((Graphics2D)g, xStart, xEnd, dottedAt, bgColor, effectColor, false); } } return x; }