Source code: javax/ide/model/DocumentListener.java
1 package javax.ide.model;
2
3 import java.util.EventListener;
4
5 /**
6 * The <code>DocumentListener</code> interface should be
7 * implemented by clients that are interested in being notified about
8 * operations on {@link javax.ide.model.Document}s.
9 *
10 * @see javax.ide.model.Document
11 * @see DocumentEvent
12 */
13 public interface DocumentListener extends EventListener
14 {
15 /**
16 * Notify listeners that the document has been opened.
17 * @param event the {@link DocumentEvent}.
18 */
19 public void opened( DocumentEvent event );
20
21 /**
22 * Notify listeners that the document is about to be closed.
23 * @param event the {@link DocumentEvent}.
24 */
25 public void willBeClosed( DocumentEvent event );
26
27 /**
28 * Notify listeners that the document has been closed. Clients should not
29 * call {@link javax.ide.model.Document} methods that cause the document
30 * to be reopened.
31 * @param event the {@link DocumentEvent}.
32 */
33 public void closed( DocumentEvent event );
34
35 /**
36 * Notify listeners that the document has been modified.
37 * @param event the {@link DocumentEvent}.
38 */
39 public void modified( DocumentEvent event );
40
41 /**
42 * Notify listeners that the document is about to be saved.
43 * @param event the {@link DocumentEvent}.
44 */
45 public void willBeSaved( DocumentEvent event );
46
47 /**
48 * Notify listeners that the document has been saved.
49 * @param event the {@link DocumentEvent}.
50 */
51 public void saved( DocumentEvent event );
52 }