void (Graphics2D g2D, Rectangle2D.Double clip) { double headerHeight = drawHeader(g2D, clip); clip.y += headerHeight; clip.height -= headerHeight; double footerHeight = drawFooter(g2D, clip); clip.height -= footerHeight; Rectangle2D.Double border = (Rectangle2D.Double) clip.clone(); clip.x += getCharWidth(g2D) / 2; clip.width -= getCharWidth(g2D); if (myPrintSettings.PRINT_LINE_NUMBERS) { double numbersStripWidth = calcNumbersStripWidth(g2D, clip) + getCharWidth(g2D) / 2; clip.x += numbersStripWidth; clip.width -= numbersStripWidth; } clip.x += getCharWidth(g2D) / 2; clip.width -= getCharWidth(g2D); drawText(g2D, clip); drawBorder(g2D, border); }