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