javax.swing.JTextArea.processComponentEvent()方法的使用及代码示例

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

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

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);
}

相关文章

JTextArea类方法