/** * 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); }
Rectangle vr = textArea.getVisibleRect(); int lineHeight = textArea.getLineHeight();
@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Rectangle visible = textArea.getVisibleRect(); Rectangle newVis = new Rectangle(visible); int selectedIndex = textArea.getCaretPosition();
/** * 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); }
/** * Paints editor augmentations such as matching brackets etc. * * @param g graphics context that shall be used for painting */ public void paintEditorAugmentations(Graphics g) { paintLineHighlights(g); Rectangle visibleRect = textArea.getVisibleRect(); paintCurrentLineHighlight(g, visibleRect); paintMarginLine(g, visibleRect); paintMatchedBracket(g); }
Rectangle vr = textArea.getVisibleRect(); int lineHeight = textArea.getLineHeight();
Rectangle vr = textArea.getVisibleRect(); int lineHeight = textArea.getLineHeight();
Rectangle vr = textArea.getVisibleRect(); int lineHeight = textArea.getLineHeight();
@Override public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Rectangle visible = textArea.getVisibleRect(); Rectangle newVis = new Rectangle(visible); int selectedIndex = textArea.getCaretPosition();
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Rectangle visible = textArea.getVisibleRect(); Rectangle newVis = new Rectangle(visible); int selectedIndex = textArea.getCaretPosition();
public void actionPerformedImpl(ActionEvent e, RTextArea textArea) { Rectangle visible = textArea.getVisibleRect(); Rectangle newVis = new Rectangle(visible); int selectedIndex = textArea.getCaretPosition();