01 /*
02 * Copyright (c) 1995-2010, The University of Sheffield. See the file
03 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
04 *
05 * This file is part of GATE (see http://gate.ac.uk/), and is free
06 * software, licenced under the GNU Library General Public License,
07 * Version 2, June 1991 (in the distribution as file licence.html,
08 * and also available at http://gate.ac.uk/gate/licence.html).
09 *
10 * ControllerEvent.java
11 *
12 * Valentin Tablan, 28-Jun-2004
13 *
14 * $Id: ControllerEvent.java 12006 2009-12-01 17:24:28Z thomas_heitz $
15 */
16
17 package gate.event;
18
19 import gate.ProcessingResource;
20
21 /**
22 * Events fired by controllers.
23 */
24 public class ControllerEvent extends GateEvent{
25 public ControllerEvent(Object source, int type, ProcessingResource pr){
26 super(source, type);
27 this.pr = pr;
28 }
29
30
31 /**
32 * @return Returns the processing resource.
33 */
34 public ProcessingResource getPr(){
35 return pr;
36 }
37 /**
38 * @param pr The processing resource involved in this event.
39 */
40 public void setPr(ProcessingResource pr){
41 this.pr = pr;
42 }
43
44 protected ProcessingResource pr;
45 public static final int RESOURCE_ADDED = 0;
46 public static final int RESOURCE_REMOVED = 1;
47
48 }
|