AnnotationList.java
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  *  AnnotationList.java
11  *
12  *  Valentin Tablan, 23 Apr 2008
13  *
14  *  $Id: AnnotationList.java 12006 2009-12-01 17:24:28Z thomas_heitz $
15  */
16 
17 package gate.gui.docview;
18 
19 import gate.gui.annedit.AnnotationData;
20 
21 import javax.swing.ListSelectionModel;
22 
23 /**
24  * Interface for document views showing a list of annotations.
25  */
26 public interface AnnotationList extends DocumentView {
27   
28   /**
29    * Obtains the selection model used by this list view.
30    @return {@link ListSelectionModel} object.
31    */
32   public ListSelectionModel getSelectionModel();
33   
34   /**
35    * Provides the annotation 
36    @param row
37    @return
38    */
39   public AnnotationData getAnnotationAtRow(int row);
40 
41   /**
42    * Returns the display row for a given annotation. 
43    @param aData the annotation for which the row is required
44    @return a positive int value if the annotation is found or -1 otherwise 
45    */
46   public int getRowForAnnotation(AnnotationData aData);
47 }