01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.proof;
12:
13: /** An abstract adapter class for receiving proof tree events.
14: * <code>proofStructureChanged</code> has an empty implementation, the
15: * other methods delegate to <code>proofStructureChanged</code>.
16: *
17: * <p>Extend this class to create a ProofTreeEvent listener and
18: * override the implementation of <code>proofStructureChanged</code>
19: * to provide a simple reaction to any kind of event, or also
20: * override the other methods to provide more fine-grained actions.
21: */
22:
23: public abstract class ProofTreeAdapter implements ProofTreeListener {
24:
25: /** The node mentioned in the ProofTreeEvent has changed, and/or
26: * there are new descendants of that node. Any nodes that are not
27: * descendants of that node are unaffected. */
28: public void proofExpanded(ProofTreeEvent e) {
29: proofStructureChanged(e);
30: }
31:
32: /** The proof tree has been pruned under the node mentioned in the
33: * ProofTreeEvent. In other words, that node should no longer
34: * have any children now. Any nodes that were not descendants of
35: * that node are unaffected.*/
36: public void proofPruned(ProofTreeEvent e) {
37: proofStructureChanged(e);
38: }
39:
40: /** The structure of the proof has changed radically. Any client should
41: * rescan the whole proof tree. */
42: public void proofStructureChanged(ProofTreeEvent e) {
43: // empty
44: }
45:
46: /** The proof trees has been closed (the list of goals is empty).
47: */
48: public void proofClosed(ProofTreeEvent e) {
49: proofStructureChanged(e);
50: }
51:
52: /** The goal mentioned in the ProofTreeEvent has been removed
53: *from the list of goals.
54: */
55: public void proofGoalRemoved(ProofTreeEvent e) {
56: proofStructureChanged(e);
57: }
58:
59: /** The goals mentiones in the list of added goals in the proof
60: * event have been added to the proof
61: */
62: public void proofGoalsAdded(ProofTreeEvent e) {
63: proofStructureChanged(e);
64: }
65:
66: /** The goals mentiones in the list of added goals in the proof
67: * event have been added to the proof
68: */
69: public void proofGoalsChanged(ProofTreeEvent e) {
70: proofStructureChanged(e);
71: }
72:
73: }
|