void (final Graphics g, final int x, final int width, Color color) { if (color != null) { int caretLine = myEditor.getCaretModel().getVisualPosition().line; int[] yRange = myEditor.visualLineToYRange(caretLine); g.setColor(color); g.fillRect(x, yRange[0], width, yRange[1] - yRange[0]); } }