1 /*
2 * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /* $Id: ChangeTrackingInterface.java 310 2007-05-18 20:26:36Z maxberger $ */
18
19 package net.sourceforge.jeuclid.dom;
20
21 /**
22 * Interface for nodes which are capable of tracking changes.
23 *
24 * @author Max Berger
25 * @version $Revision: 310 $
26 */
27 public interface ChangeTrackingInterface {
28 /**
29 * Called when the element has changed.
30 *
31 * @param propagate
32 * if set to true, change is also fired on parent and
33 * registered listeners.
34 */
35 void fireChanged(boolean propagate);
36
37 /**
38 * Adds a change listener to this element.
39 *
40 * @param listener
41 * the element to be notified in case of changes (if propagate
42 * is set).
43 */
44 void addListener(ChangeTrackingInterface listener);
45
46 /**
47 * fires a change on this element and all its children, but no listeners
48 * and parents.
49 */
50 void fireChangeForSubTree();
51 }