javax.swing.JTextPane.scrollRectToVisible()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中javax.swing.JTextPane.scrollRectToVisible()方法的一些代码示例,展示了JTextPane.scrollRectToVisible()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.scrollRectToVisible()方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:scrollRectToVisible

JTextPane.scrollRectToVisible介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-kenai-ui

public void scrollRectToVisible(Rectangle aRect) {
    if (!disableAutoScroll)
    super.scrollRectToVisible(aRect);
  }
};

代码示例来源:origin: chatty/chatty

@Override
  public void run() {
    news.scrollRectToVisible(new Rectangle(0, 0, 1, 1));
  }
});

代码示例来源:origin: chatty/chatty

/**
 * Jump to the given position (ref) in the current page
 * 
 * @param ref The position to jump to, if it is an empty String, then it
 * will scroll to the very top
 * @throws NullPointerException If {@code ref} is {@code null}
 */
private void jumpTo(final String ref) {
  if (ref.isEmpty()) {
    textPane.scrollRectToVisible(new Rectangle(0,0,1,1));
  } else {
    textPane.scrollToReference(ref);
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Accessor for text area.
 * This is used by Actions that need ot act on the text area of the View.
 */
public void select(int start, int end) {
  editor.select(start, end);
  try {
    editor.scrollRectToVisible(editor.modelToView(start));
  } catch (BadLocationException e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: zzhang5/zooinspector

dataArea.scrollRectToVisible(viewRect);

代码示例来源:origin: org.antlr/stringtemplate

m.output.scrollRectToVisible(m.output.modelToView(e.outputStartChar));

代码示例来源:origin: eu.mihosoft.vrl/vrl

&& currentMessage.isScrollToMessageEnd()) {
messageField.scrollRectToVisible(
    new Rectangle(0, messageField.getHeight() - 2, 1, 1));

相关文章

JTextPane类方法