01 /*
02 * ObjectModificationEvent.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Marin Dimitrov, 21/Sep/2001
13 *
14 */
15
16
17 package gate.event;
18
19 import junit.framework.Assert;
20
21 public class ObjectModificationEvent extends GateEvent {
22
23 public static final int OBJECT_CREATED = 1000;
24 public static final int OBJECT_MODIFIED = 1001;
25 public static final int OBJECT_DELETED = 1002;
26
27 private static int subtype;
28
29 public ObjectModificationEvent(Object source, int type, int subtype) {
30
31 super(source,type);
32
33 Assert.assertTrue(type == OBJECT_CREATED ||
34 type == OBJECT_DELETED ||
35 type == OBJECT_MODIFIED);
36
37 ObjectModificationEvent.subtype = subtype;
38 }
39
40 public int getSubType() {
41 return ObjectModificationEvent.subtype;
42 }
43 }
|