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.picorder;
25:
26: import jacareto.replay.event.ReplayEvent;
27: import jacareto.replay.event.ReplayListener;
28: import jacareto.system.Environment;
29: import jacareto.system.EnvironmentMember;
30:
31: /**
32: * A replay listener for Picorder.
33: *
34: * @author Thomas Leonhardt
35: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a> (Version 1.1)
36: * @version 2.03
37: */
38: public class PicorderReplayListener extends EnvironmentMember implements
39: ReplayListener {
40: /** The picorde replay instance. */
41: private PicorderReplay picorderReplay;
42:
43: /**
44: * Creates a new picorder replay listener.
45: *
46: * @param env the environment
47: * @param picorderReplay DOCUMENT ME!
48: */
49: public PicorderReplayListener(Environment env,
50: PicorderReplay picorderReplay) {
51: super (env);
52: this .picorderReplay = picorderReplay;
53: }
54:
55: /**
56: * Called when replay state has changed.
57: *
58: * @param event {@link ReplayEvent}
59: */
60: public void replayStateChanged(ReplayEvent event) {
61: if (event.getID() == ReplayEvent.STOPPED) {
62: Picorder.replayStopped(env, picorderReplay, event
63: .getReplay());
64: }
65: }
66: }
|