1 package fr.ove.openmath.courses.editor.events;
2
3 import java.util.EventObject;
4
5 /***
6 * The event to send to all objects that implements the interface EditorListener
7 * and which want to be alerted of changes of the applet they are listening to.
8 *
9 * @author © 1999 DIRAT Laurent
10 * @version 1.0 21/04/99
11 */
12 public class EditorEvent extends EventObject {
13 /***
14 * The action to execute with the event.
15 */
16 private Object action;
17
18 /***
19 * The argument of the action to execute.
20 */
21 private Object argument;
22
23 /***
24 * The constructor.
25 * @param src the object which produces this event.
26 */
27 public EditorEvent(Object src) {
28 super(src);
29 }
30
31 /***
32 * Sets the action and its argument, if necessary, to execute to the event.
33 * @param action the action to execute.
34 * @param argument the action argument. If the action don't need
35 * an argument, it must be sets to <CODE>null</CODE>.
36 */
37 public void setAction(Object action, Object argument) {
38 this.action = action;
39 this.argument = argument;
40 }
41
42 /***
43 * Returns the action associated with the event.
44 */
45 public Object getAction() {
46 return action;
47 }
48
49 /***
50 * Returns the argument of the action.
51 */
52 public Object getArgument() {
53 return argument;
54 }
55
56
57 }