本文整理了Java中javax.swing.JTextArea.scrollRectToVisible()
方法的一些代码示例,展示了JTextArea.scrollRectToVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.scrollRectToVisible()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:scrollRectToVisible
暂无
代码示例来源:origin: stackoverflow.com
textArea.scrollRectToVisible(viewRect);
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
public void run()
{
_dlg.txtSQL.scrollRectToVisible(new Rectangle(0,0,1,1));
}
});
代码示例来源:origin: realXuJiang/bigtable-sql
public void run()
{
_dlg.txtSQL.scrollRectToVisible(new Rectangle(0,0,1,1));
}
});
代码示例来源:origin: chatty/chatty
@Override
public void run() {
setFocusableWindowState(true);
debugMessage.scrollRectToVisible(new Rectangle());
}
});
代码示例来源:origin: edu.illinois.lis/indri
/** Keeps the message pane showing the last line appended. */
private void ensureMessagesVisible() {
int len = messages.getText().length();
try {
messages.scrollRectToVisible(messages.modelToView(len));
} catch (javax.swing.text.BadLocationException ex) {
// don't care.
}
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
@Override
public void run() {
// automatically scroll down to the last line
view.scrollRectToVisible(
new Rectangle(0, view.getHeight() - 1, 1, 1));
}
});
代码示例来源:origin: ganshane/shakey
@Override public void run() {
m_msg.append(str);
m_msg.append( "\n\n");
Dimension d = m_msg.getSize();
m_msg.scrollRectToVisible( new Rectangle( 0, d.height, 1, 1) );
}
});
代码示例来源:origin: bobbylight/RSyntaxTextArea
textArea.scrollRectToVisible(visible);
代码示例来源:origin: net.sf.sfac/sfac-core
public void append(final String txt) {
if (SwingUtilities.isEventDispatchThread()) {
textArea.append(txt);
if (!isScrollLock()) {
Dimension textAreaSize = textArea.getSize();
int textAreaHeight = textAreaSize.height;
if (textAreaHeight > 16) {
Rectangle bottomRect = new Rectangle(0, textAreaHeight - 16, 16, 16);
textArea.scrollRectToVisible(bottomRect);
}
}
} else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
append(txt);
}
});
}
}
代码示例来源:origin: edu.illinois.lis/indri
public void status(int code, String documentFile, String error,
int documentsIndexed, int documentsSeen) {
if (code == action_code.FileOpen.swigValue()) {
messages.append("Documents: " + documentsIndexed + "\n");
messages.append("Opened " + documentFile + "\n");
} else if (code == action_code.FileSkip.swigValue()) {
messages.append("Skipped " + documentFile + "\n");
} else if (code == action_code.FileError.swigValue()) {
messages.append("Error in " + documentFile + " : " + error +
"\n");
} else if (code == action_code.DocumentCount.swigValue()) {
if( (documentsIndexed % 500) == 0)
messages.append( "Documents: " + documentsIndexed + "\n" );
}
int len = messages.getText().length();
try {
messages.scrollRectToVisible(messages.modelToView(len));
} catch (javax.swing.text.BadLocationException ex) {
// don't care.
}
}
}
代码示例来源:origin: openpreserve/jhove
texta.select (0, 0);
Rectangle r = new Rectangle (0, 0, 1, 1);
texta.scrollRectToVisible (r);
代码示例来源:origin: net.sf.squirrel-sql.plugins/firebirdmanager
/**
* Refresh the textarea and scroll to the end
*/
private void refreshDisplay() {
this.textArea.setCaretPosition(this.textArea.getDocument().getLength());
this.textArea.scrollRectToVisible(this.textArea.getVisibleRect());
this.scrollPane.getVerticalScrollBar().setValue(this.scrollPane.getVerticalScrollBar().getMaximum());
this.textArea.paintImmediately(0,0,this.textArea.getWidth(), this.textArea.getHeight());
}
代码示例来源:origin: net.sf.mmax2/mmax2
try
inputTextArea.scrollRectToVisible(inputTextArea.modelToView(inputTextArea.getLineEndOffset(inputTextArea.getLineCount())));
inputTextArea.setCaretPosition(inputTextArea.getLineEndOffset(inputTextArea.getLineCount()));
代码示例来源:origin: openpreserve/jhove
texta.select (0, 0);
Rectangle r = new Rectangle (0, 0, 1, 1);
texta.scrollRectToVisible (r);
代码示例来源:origin: com.fifesoft/rsyntaxtextarea
textArea.scrollRectToVisible(visible);
内容来源于网络,如有侵权,请联系作者删除!