gate.event
Class DocumentEvent

java.lang.Object
  extended by java.util.EventObject
      extended by gate.event.GateEvent
          extended by gate.event.DocumentEvent
All Implemented Interfaces:
Serializable

public class DocumentEvent
extends GateEvent

This class models events fired by an Document.

See Also:
Serialized Form

Field Summary
static int ANNOTATION_SET_ADDED
          Event type used to mark the addition of an AnnotationSet
static int ANNOTATION_SET_REMOVED
          Event type used to mark the removal of an AnnotationSet
static int CONTENT_EDITED
          Event type used to mark the editing of the document content
 
Fields inherited from class gate.event.GateEvent
FEATURES_UPDATED, type
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DocumentEvent(Document source, int type, Long editStart, Long editEnd)
          Constructor.
DocumentEvent(Document source, int type, String setName)
          Constructor.
 
Method Summary
 String getAnnotationSetName()
          Gets the name of the AnnotationSet that has been added or removed.
 Long getEditEnd()
           
 Long getEditStart()
           
 
Methods inherited from class gate.event.GateEvent
getType
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANNOTATION_SET_ADDED

public static final int ANNOTATION_SET_ADDED
Event type used to mark the addition of an AnnotationSet

See Also:
Constant Field Values

ANNOTATION_SET_REMOVED

public static final int ANNOTATION_SET_REMOVED
Event type used to mark the removal of an AnnotationSet

See Also:
Constant Field Values

CONTENT_EDITED

public static final int CONTENT_EDITED
Event type used to mark the editing of the document content

See Also:
Constant Field Values
Constructor Detail

DocumentEvent

public DocumentEvent(Document source,
                     int type,
                     String setName)
Constructor.

Parameters:
source - the document that has been changed
type - the type of the event
setName - the name of the AnnotationSet that has been added or removed.

DocumentEvent

public DocumentEvent(Document source,
                     int type,
                     Long editStart,
                     Long editEnd)
Constructor.

Parameters:
source - the document that has been changed
type - the type of the event
editStart - the offset where the edit operation started
editEnd - the offset where the edit operation ended
Method Detail

getAnnotationSetName

public String getAnnotationSetName()
Gets the name of the AnnotationSet that has been added or removed.


getEditEnd

public Long getEditEnd()
Returns:
Returns the editEnd.

getEditStart

public Long getEditStart()
Returns:
Returns the editStart.