1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.gscg.gameleader.dialogs.actor.actions;
16
17 import java.awt.event.ActionEvent;
18
19 import javax.swing.AbstractAction;
20
21 import nl.tudelft.simulation.actor.ActorInterface;
22
23 import org.gscg.gameleader.dialogs.actor.components.ActorDialog;
24
25 /***
26 * The ActorDialogAction is used when a game administrator clicks on an actor on
27 * the animation panel.
28 * <p>
29 *
30 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
31 * Delft, the Netherlands. All rights reserved.
32 *
33 * See for project information <a href="http://www.simulation.tudelft.nl/">
34 * www.simulation.tudelft.nl </a>.
35 *
36 * The source code and binary code of this software is proprietary information
37 * of Delft University of Technology.
38 *
39 * @author <a
40 * href="http://www.tbm.tudelft.nl/webstaf/stijnh/index.htm">Stijn-Pieter
41 * van Houten </a>
42 * @version $Revision: 1.1 $ $Date: 2005/06/16 12:34:10 $
43 * @since 1.0.3
44 */
45 public class ActorDialogAction extends AbstractAction
46 {
47 /*** the serial version uid */
48 private static final long serialVersionUID = 11L;
49
50 /*** the actor to create a dialog for */
51 private ActorInterface actor = null;
52
53 /***
54 * constructs a new ActorDialogAction
55 *
56 * @param actor the actor to create a dialog for
57 */
58 public ActorDialogAction(final ActorInterface actor)
59 {
60 super(actor.getName());
61 this.actor = actor;
62 }
63
64 /***
65 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
66 */
67 public void actionPerformed(final ActionEvent actionEvent)
68 {
69 new ActorDialog(this.actor);
70 }
71 }