/** * Repaints the gutter in a text area's scroll pane, if necessary. * * @param textArea The text area. */ public static void possiblyRepaintGutter(RTextArea textArea) { Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { gutter.repaint(); } }
/** * Sets the color for the "border" line. * * @param color The new color. * @see #getBorderColor() */ public void setBorderColor(Color color) { ((GutterBorder)getBorder()).setColor(color); repaint(); }
@Override public void mouseClicked(MouseEvent e) { Point p = e.getPoint(); int line = rowAtPoint(p); RSyntaxTextArea rsta = (RSyntaxTextArea)textArea; FoldManager fm = rsta.getFoldManager(); Fold fold = fm.getFoldForLine(line); if (fold!=null) { fold.toggleCollapsedState(); getGutter().repaint(); textArea.repaint(); } }
private void handleDocumentEvent(DocumentEvent e, Shape a, ViewFactory f) { int n = calculateLineCount(); if (this.nlines != n) { this.nlines = n; WrappedSyntaxView.this.preferenceChanged(this, false, true); // have to repaint any views after the receiver. RSyntaxTextArea textArea = (RSyntaxTextArea)getContainer(); textArea.repaint(); // Must also revalidate container so gutter components, such // as line numbers, get updated for this line's new height Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { gutter.revalidate(); gutter.repaint(); } } else if (a != null) { Component c = getContainer(); Rectangle alloc = (Rectangle) a; c.repaint(alloc.x, alloc.y, alloc.width, alloc.height); } }
/** * Repaints the gutter in a text area's scroll pane, if necessary. * * @param textArea The text area. */ public static void possiblyRepaintGutter(RTextArea textArea) { Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { gutter.repaint(); } }
/** * Sets the color for the "border" line. * * @param color The new color. * @see #getBorderColor() */ public void setBorderColor(Color color) { ((GutterBorder)getBorder()).setColor(color); repaint(); }
/** * Sets the color for the "border" line. * * @param color The new color. * @see #getBorderColor() */ public void setBorderColor(Color color) { ((GutterBorder)getBorder()).setColor(color); repaint(); }
/** * Sets the color for the "border" line. * * @param color The new color. * @see #getBorderColor() */ public void setBorderColor(Color color) { ((GutterBorder)getBorder()).setColor(color); repaint(); }
@Override public void mouseClicked(MouseEvent e) { Point p = e.getPoint(); int line = rowAtPoint(p); RSyntaxTextArea rsta = (RSyntaxTextArea)textArea; FoldManager fm = rsta.getFoldManager(); Fold fold = fm.getFoldForLine(line); if (fold!=null) { fold.toggleCollapsedState(); getGutter().repaint(); textArea.repaint(); } }
private void handleDocumentEvent(DocumentEvent e, Shape a, ViewFactory f) { int n = calculateLineCount(); if (this.nlines != n) { this.nlines = n; WrappedSyntaxView.this.preferenceChanged(this, false, true); // have to repaint any views after the receiver. RSyntaxTextArea textArea = (RSyntaxTextArea)getContainer(); textArea.repaint(); // Must also revalidate container so gutter components, such // as line numbers, get updated for this line's new height Gutter gutter = RSyntaxUtilities.getGutter(textArea); if (gutter!=null) { gutter.revalidate(); gutter.repaint(); } } else if (a != null) { Component c = getContainer(); Rectangle alloc = (Rectangle) a; c.repaint(alloc.x, alloc.y, alloc.width, alloc.height); } }