d6e9ba93b39df4638cc7b78ce367fefa84e0424c
[jalview.git] / src / jalview / datamodel / ContactListProviderI.java
1 package jalview.datamodel;
2
3 import java.awt.Color;
4
5 public interface ContactListProviderI
6 {
7
8   /**
9    * 
10    * @return position index for this contact List (usually sequence position or
11    *         alignment column)
12    */
13   int getPosition();
14
15   /**
16    * dimension of list where getContactAt(column<getContactHeight()) may return
17    * a value
18    * 
19    * @return
20    */
21   int getContactHeight();
22
23   /**
24    * get a value representing contact at column for this site
25    * 
26    * @param column
27    * @return Double.NaN or a contact strength for this site
28    */
29   double getContactAt(int column);
30
31   /**
32    * Return positions in local reference corresponding to cStart and cEnd in
33    * matrix data. Positions are base 1 column indices for sequence associated
34    * matrices.
35    * 
36    * @param cStart
37    * @param cEnd
38    * @return int[] { start, end (inclusive) for each contiguous segment}
39    */
40   default int[] getMappedPositionsFor(int cStart, int cEnd)
41   {
42     return new int[] { cStart, cEnd };
43   }
44
45   default Color getColourForGroup()
46   {
47     return null;
48   }
49
50 }