javax.swing.text.AbstractDocument.removeDocumentListener()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(131)

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

AbstractDocument.removeDocumentListener介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages

protected void componentHidden () {
  if (listener != null) {
    listener.remove ();
    listener = null;
  }
  if (lastPane != null)
    lastPane.removeCaretListener (caretListener);
  lastPane = null;
  if (lastDocument != null)
    lastDocument.removeDocumentListener (documentListener);
  lastDocument = null;
  highlighting.removeHighlight ();
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

@Override
public void read( IScriptPartId partId, String strSource, String strDescription ) throws IOException
{
 _partId = partId;
 _labelCaption.setText( strDescription );
 AbstractDocument doc = (AbstractDocument)_editor.getDocument();
 if( doc != null )
 {
  doc.removeDocumentListener( _docHandler );
 }
 // Replace the Windows style new-line sequence with just a new-line.
 // Otherwise, we have serious problems with the editor (it ALWAYS thinks new lines are one character, regardless).
 strSource = GosuStringUtil.replace( strSource, "\r\n", "\n" );
 _editor.read( new StringReader( strSource ), strDescription );
 addDocumentListener();
 parse();
}

代码示例来源:origin: stackoverflow.com

"With DocumentListener", JOptionPane.INFORMATION_MESSAGE);
myDocument.removeDocumentListener(myDocumentListener);

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

@Override
public void read( IScriptPartId partId, String strSource ) throws IOException
{
 setScriptPart( partId );
 setLabel( "" );
 JTextComponent editor = getEditor();
 AbstractDocument doc = (AbstractDocument)editor.getDocument();
 if( doc != null )
 {
  doc.removeDocumentListener( getDocHandler() );
 }
 // Replace the Windows style new-line sequence with just a new-line.
 // Otherwise, the editor thinks new lines are one character
 strSource = GosuStringUtil.replace( strSource, "\r\n", "\n" );
 editor.read( new StringReader( strSource ), "" );
 addDocumentListener();
 parse();
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages

documentListener = new CDocumentListener ();
if (lastDocument != null && lastDocument != doc) {
  lastDocument.removeDocumentListener (documentListener);
  lastDocument = null;

相关文章