KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > editor > structure > api > DocumentModelListener


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20
21 package org.netbeans.modules.editor.structure.api;
22
23 import java.util.EventListener JavaDoc;
24
25
26 /**
27  * An implementation of EventListener allowing to listen o changes of the DocumentModel.
28  * This listner is very similar to the {@link DocumentElementListener} but in contrast with it
29  * it allows to listen on the entire model, not only on a particullar element.
30  *<br>
31  * Allows to listen on following changes:
32  * <ul>
33  * <li>A new element has been added into the model
34  * <li>An element has been removed from the model
35  * <li>Content of an element has been changed
36  * <li>Attributes of an element has changed
37  * </ul>
38  *
39  * @author Marek Fukala
40  * @version 1.0
41  *
42  * @see DocumentElement
43  * @see DocumentElementEvent
44  * @see DocumentElementListener
45  *
46  */

47 public interface DocumentModelListener extends EventListener JavaDoc {
48     
49     /** fired when a new element has been added into the model. */
50     public void documentElementAdded(DocumentElement de);
51     
52     /** fired when an existing element has been removed from the model. */
53     public void documentElementRemoved(DocumentElement de);
54     
55     /** fired when an element's text content has been changed. */
56     public void documentElementChanged(DocumentElement de);
57     
58     /** fired when attributes of an element have been changed (removed/added/value changed) */
59     public void documentElementAttributesChanged(DocumentElement de);
60     
61 }
62
Popular Tags