本文整理汇总了Java中org.fife.ui.rtextarea.Gutter.repaint方法的典型用法代码示例。如果您正苦于以下问题:Java Gutter.repaint方法的具体用法?Java Gutter.repaint怎么用?Java Gutter.repaint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fife.ui.rtextarea.Gutter
的用法示例。
在下文中一共展示了Gutter.repaint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleDocumentEvent
import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
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);
}
}
示例2: possiblyRepaintGutter
import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
/**
* Repaints the gutter in a text area's scroll pane, if necessary.
*
* @param textArea The text area.
*/
protected void possiblyRepaintGutter(RTextArea textArea) {
Gutter gutter = RSyntaxUtilities.getGutter(textArea);
if (gutter!=null) {
gutter.repaint();
}
}
示例3: handleDocumentEvent
import org.fife.ui.rtextarea.Gutter; //导入方法依赖的package包/类
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
Container parent = textArea.getParent();
if (parent instanceof JViewport &&
parent.getParent() instanceof RTextScrollPane) {
RTextScrollPane sp = (RTextScrollPane) parent.getParent();
Gutter gutter = sp.getGutter();
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);
}
}