01: /*
02: * Jacareto Copyright (c) 2002-2005
03: * Applied Computer Science Research Group, Darmstadt University of
04: * Technology, Institute of Mathematics & Computer Science,
05: * Ludwigsburg University of Education, and Computer Based
06: * Learning Research Group, Aachen University. All rights reserved.
07: *
08: * Jacareto is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * Jacareto is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public
19: * License along with Jacareto; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: *
22: */
23:
24: package jacareto.test;
25:
26: import java.util.EventObject;
27:
28: /**
29: * An event which stands for a test report change.
30: *
31: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
32: * @version 1.01
33: */
34: public class TestReportEvent extends EventObject {
35: /** A test report element has been added to the test report. */
36: public static final int REPORT_ELEMENT_ADDED = 0;
37:
38: /** The test report has been cleared. */
39: public static final int REPORT_CLEARED = 1;
40:
41: /** The id. */
42: private int id;
43:
44: /** The element. */
45: private TestReportElement element;
46:
47: /**
48: * Creates a new test report event with the specified values
49: *
50: * @param source the test report
51: * @param id the id of the test event
52: * @param element the related element, or <code>null</code> if no element is related.
53: */
54: public TestReportEvent(Object source, int id,
55: TestReportElement element) {
56: super (source);
57: this .id = id;
58: this .element = element;
59: }
60:
61: /**
62: * Returns the id.
63: *
64: * @return DOCUMENT ME!
65: */
66: public int getID() {
67: return id;
68: }
69:
70: /**
71: * Returns the related test report element, or <code>null</code> if no test report element is
72: * related.
73: *
74: * @return DOCUMENT ME!
75: */
76: public TestReportElement getElement() {
77: return element;
78: }
79: }
|