DocumentEvent (Java SE 15 & JDK 15) (original) (raw)

All Known Implementing Classes:

[AbstractDocument.DefaultDocumentEvent](../text/AbstractDocument.DefaultDocumentEvent.html "class in javax.swing.text")


public interface DocumentEvent

Interface for document change notifications. This provides detailed information to Document observers about how the Document changed. It provides high level information such as type of change and where it occurred, as well as the more detailed structural changes (What Elements were inserted and removed).

See Also:

Document, DocumentListener

Modifier and Type Method Description
DocumentEvent.ElementChange getChange​(Element elem) Gets the change information for the given element.
Document getDocument() Gets the document that sourced the change event.
int getLength() Returns the length of the change.
int getOffset() Returns the offset within the document of the start of the change.
DocumentEvent.EventType getType() Gets the type of event.