public interface DocumentListener extends EventListener
该文件接口的默认实现(abstractdocument)支持异步的突变。如果是使用这个功能(即突变是由其他比Swing事件线程的线程),听众将通过改变线程通知。这意味着,如果异步进行更新,这个接口的实现必须是线程安全的!
的documentevent通知是基于JavaBeans事件模型。没有保证传递给侦听器的顺序,并且所有的侦听器必须在向文档作进一步的突变之前通知所有的侦听器。这意味着对所有DocumentListener实现可能不发生的事件源(即相关文档)。
Document
,
StyledDocument
,
DocumentEvent
Modifier and Type | Method and Description |
---|---|
void |
changedUpdate(DocumentEvent e)
通知通知一个属性或一组属性的更改。
|
void |
insertUpdate(DocumentEvent e)
通知有一个插入到文档中的通知。
|
void |
removeUpdate(DocumentEvent e)
发出通知,该文档的一部分已被删除。
|
void insertUpdate(DocumentEvent e)
e
-文件事件
void removeUpdate(DocumentEvent e)
e
-文件事件
void changedUpdate(DocumentEvent e)
e
-文件事件
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.