DocumentChangeAdapter Class
- public abstract class DocumentChangeAdapter
extends Object
implements PropertyChangeListener
This is a utility class that can be used to adapt a Application.PROP_ActiveDocumentView
change event to an
event that only fires if the actual underlying document changes. It may be extended and added as a listener on the
Application. When the ActiveDocumentView changes, it will see if the underlying IDocument actually changed and
if so, call the documentChange method.
-
Hierarchy
-
Object
DocumentChangeAdapter
-
All Implemented Interfaces
-
EventListener
, PropertyChangeListener
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentChangeAdapter
public DocumentChangeAdapter()
documentChange(IDocument, IDocument) Method
public abstract void documentChange(IDocument
docOld,
IDocument
docNew)
This method should be overridden by extending classes. It will be called only when docOld != docNew. Note that
either one may be null if the there was no previous document or there is no current document.
Parameters
-
docOld
- the old value
-
docNew
- the new value
propertyChange(PropertyChangeEvent) Method
public void propertyChange(PropertyChangeEvent
e)
Implementation of the propertyChange method. Should only be used for the Application.PROP_ActiveDocumentView property
change listener. Delegates to the documentChange method if the document represented by old document view and the
document represented by the new document view are different.
Parameters
-
e
- The property change event. This object may only be used for listeners of PROP_ActiveDocumentView.