/** * Paints editor augmentations added by RTextArea: highlighted lines, * current line highlight, and margin line. * * @param g The graphics context with which to paint. */ protected void paintEditorAugmentations(Graphics g) { Rectangle visibleRect = textArea.getVisibleRect(); paintLineHighlights(g); paintCurrentLineHighlight(g, visibleRect); paintMarginLine(g, visibleRect); }
/** * Paints editor augmentations added by RTextArea: highlighted lines, * current line highlight, and margin line. * * @param g The graphics context with which to paint. */ protected void paintEditorAugmentations(Graphics g) { Rectangle visibleRect = textArea.getVisibleRect(); paintLineHighlights(g); paintCurrentLineHighlight(g, visibleRect); paintMarginLine(g, visibleRect); }
protected void paintBackground(Graphics g) { // Only fill in the background if an image isn't being used. Color bg = textArea.getBackground(); if (bg!=null) { g.setColor(bg); //g.fillRect(0, 0, textArea.getWidth(), textArea.getHeight()); Rectangle r = g.getClipBounds(); g.fillRect(r.x,r.y, r.width,r.height); } Rectangle visibleRect = textArea.getVisibleRect(); paintLineHighlights(g); paintCurrentLineHighlight(g, visibleRect); paintMarginLine(g, visibleRect); }
protected void paintBackground(Graphics g) { // Only fill in the background if an image isn't being used. Color bg = textArea.getBackground(); if (bg!=null) { g.setColor(bg); //g.fillRect(0, 0, textArea.getWidth(), textArea.getHeight()); Rectangle r = g.getClipBounds(); g.fillRect(r.x,r.y, r.width,r.height); } Rectangle visibleRect = textArea.getVisibleRect(); paintLineHighlights(g); paintCurrentLineHighlight(g, visibleRect); paintMarginLine(g, visibleRect); }