private void drawLineNumber(Graphics2D g, double y) {
    if (!myPrintSettings.PRINT_LINE_NUMBERS || !myPerformActualDrawing) {
      return;
    }
    FontRenderContext fontRenderContext = g.getFontRenderContext();
    double width = myPlainFont.getStringBounds(String.valueOf(myLineNumber), fontRenderContext).getWidth() + getCharWidth(g);
    Color savedColor = g.getColor();
    Font savedFont = g.getFont();
    g.setColor(Color.black);
    g.setFont(myPlainFont);
    drawStringToGraphics(g, String.valueOf(myLineNumber), -width, getLineHeight(g) - getDescent(g) + y);
    g.setColor(savedColor);
    g.setFont(savedFont);
  }
private void drawLineNumber(Graphics2D g, double y)