JAL-4134 support recovery of mapped positions for raw matrix column index in Mappable...
[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   /**
33    * Return positions in local reference corresponding to cStart and cEnd in matrix data. Positions are base 1 column indices for sequence associated matrices.
34    * @param cStart
35    * @param cEnd
36    * @return int[] { start, end (inclusive) for each contiguous segment}
37    */
38   default int[] getMappedPositionsFor(int cStart, int cEnd) {
39     return new int[] { cStart, cEnd};
40   }
41
42   default Color getColourForGroup() {
43     return null;
44   }
45
46 }