|
DocumentEvent |
|
1 /* 2 * Copyright (c) 1998-2001, 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 * Valentin Tablan 12/12/2000 10 * 11 * $Id: DocumentEvent.java,v 1.3 2001/09/21 12:21:54 valyt Exp $ 12 */ 13 package gate.event; 14 15 import gate.*; 16 17 import java.util.EventObject; 18 19 /** 20 * This class models events fired by an {@link gate.Document}. 21 */ 22 public class DocumentEvent extends GateEvent { 23 24 /**Event type used to mark the addition of an {@link gate.AnnotationSet}*/ 25 public static final int ANNOTATION_SET_ADDED = 101; 26 27 /**Event type used to mark the removal of an {@link gate.AnnotationSet}*/ 28 public static final int ANNOTATION_SET_REMOVED = 102; 29 30 /** 31 * Constructor. 32 * @param source the document that has been changed 33 * @param type the type of the event 34 * @param setName the name of the {@link gate.AnnotationSet} that has been 35 * added or removed. 36 */ 37 public DocumentEvent(Document source, int type, String setName) { 38 super(source, type); 39 this.annotationSetName = setName; 40 } 41 42 /** 43 * Gets the name of the {@link gate.AnnotationSet} that has been added or 44 * removed. 45 */ 46 public String getAnnotationSetName() { 47 return annotationSetName; 48 } 49 50 private String annotationSetName; 51 52 }
|
DocumentEvent |
|