|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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).
Document
,
DocumentListener
Nested Class Summary | |
static interface |
DocumentEvent.ElementChange
Describes changes made to a specific element. |
static class |
DocumentEvent.EventType
Enumeration for document event types |
Method Summary | |
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. |
Method Detail |
public int getOffset()
public int getLength()
public Document getDocument()
public DocumentEvent.EventType getType()
public DocumentEvent.ElementChange getChange(Element elem)
This method is for observers to discover the structural changes that were made. This means that only elements that existed prior to the mutation (and still exist after the mutatino) need to have ElementChange records. The changes made available need not be recursive.
For example, if the an element is removed from it's parent, this method should report that the parent changed and provide an ElementChange implementation that describes the change to the parent. If the child element removed had children, these elements do not need to be reported as removed.
If an child element is insert into a parent element, the parent element should report a change. If the child element also had elements inserted into it (grandchildren to the parent) these elements need not report change.
elem
- the element
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.