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.jacshow;
25:
26: import java.util.EventObject;
27:
28: /**
29: * A sequence element event.
30: *
31: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
32: * @version 1.0
33: */
34: public class SequenceElementEvent extends EventObject {
35: /** A sequence element has been started. */
36: public static final int STARTED = 0;
37:
38: /** A sequence element has been stopped. */
39: public static final int STOPPED = 1;
40:
41: /** The id. */
42: private int id;
43:
44: /** The time the event has been created, in msec. */
45: private long when;
46:
47: /**
48: * Creates a new sequence element event.
49: *
50: * @param source the source
51: * @param id DOCUMENT ME!
52: */
53: public SequenceElementEvent(Object source, int id) {
54: super (source);
55: setID(id);
56: setWhen(System.currentTimeMillis());
57: }
58:
59: /**
60: * Sets the id.
61: *
62: * @param id DOCUMENT ME!
63: */
64: public void setID(int id) {
65: this .id = id;
66: }
67:
68: /**
69: * Sets the time the event has been created, in msec
70: *
71: * @param when the new time
72: */
73: public void setWhen(long when) {
74: this .when = when;
75: }
76:
77: /**
78: * Returns the id.
79: *
80: * @return DOCUMENT ME!
81: */
82: public int getID() {
83: return id;
84: }
85:
86: /**
87: * Returns the time.
88: *
89: * @return the time in msec
90: */
91: public long getWhen() {
92: return when;
93: }
94: }
|