本文整理了Java中javax.swing.JTextArea.processComponentEvent()
方法的一些代码示例,展示了JTextArea.processComponentEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.processComponentEvent()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:processComponentEvent
暂无
代码示例来源:origin: bobbylight/RSyntaxTextArea
/**
* Overridden so we can tell when the text area is resized and update the
* current-line highlight, if necessary (i.e., if it is enabled and if
* lineWrap is enabled.
*
* @param e The component event about to be sent to all registered
* <code>ComponentListener</code>s.
*/
@Override
protected void processComponentEvent(ComponentEvent e) {
// In line wrap mode, resizing the text area means that the caret's
// "line" could change - not to a different logical line, but a
// different physical one. So, here we force a repaint of the current
// line's highlight if necessary.
if (e.getID()==ComponentEvent.COMPONENT_RESIZED &&
getLineWrap() && getHighlightCurrentLine()) {
previousCaretY = -1; // So we are sure to repaint.
fireCaretUpdate(mouseListener);
}
super.processComponentEvent(e);
}
代码示例来源:origin: com.fifesoft/rsyntaxtextarea
/**
* Overridden so we can tell when the text area is resized and update the
* current-line highlight, if necessary (i.e., if it is enabled and if
* lineWrap is enabled.
*
* @param e The component event about to be sent to all registered
* <code>ComponentListener</code>s.
*/
@Override
protected void processComponentEvent(ComponentEvent e) {
// In line wrap mode, resizing the text area means that the caret's
// "line" could change - not to a different logical line, but a
// different physical one. So, here we force a repaint of the current
// line's highlight if necessary.
if (e.getID()==ComponentEvent.COMPONENT_RESIZED &&
getLineWrap() && getHighlightCurrentLine()) {
previousCaretY = -1; // So we are sure to repaint.
fireCaretUpdate(mouseListener);
}
super.processComponentEvent(e);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-editor
/**
* Overridden so we can tell when the text area is resized and update the
* current-line highlight, if necessary (i.e., if it is enabled and if
* lineWrap is enabled.
*
* @param e The component event about to be sent to all registered
* <code>ComponentListener</code>s.
*/
protected void processComponentEvent(ComponentEvent e) {
// In line wrap mode, resizing the text area means that the caret's
// "line" could change - not to a different logical line, but a
// different physical one. So, here we force a repaint of the current
// line's highlight if necessary.
if (e.getID()==ComponentEvent.COMPONENT_RESIZED &&
getLineWrap()==true && getHighlightCurrentLine()) {
previousCaretY = -1; // So we are sure to repaint.
fireCaretUpdate(mouseListener);
}
super.processComponentEvent(e);
}
代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea
/**
* Overridden so we can tell when the text area is resized and update the
* current-line highlight, if necessary (i.e., if it is enabled and if
* lineWrap is enabled.
*
* @param e The component event about to be sent to all registered
* <code>ComponentListener</code>s.
*/
protected void processComponentEvent(ComponentEvent e) {
// In line wrap mode, resizing the text area means that the caret's
// "line" could change - not to a different logical line, but a
// different physical one. So, here we force a repaint of the current
// line's highlight if necessary.
if (e.getID()==ComponentEvent.COMPONENT_RESIZED &&
getLineWrap()==true && getHighlightCurrentLine()) {
previousCaretY = -1; // So we are sure to repaint.
fireCaretUpdate(mouseListener);
}
super.processComponentEvent(e);
}
内容来源于网络,如有侵权,请联系作者删除!