Merge branch 'develop' into features/JAL-4134_use_annotation_row_for_colours_and_groups
[jalview.git] / src / jalview / datamodel / ContactListProviderI.java
index 37c4e07..d6e9ba9 100644 (file)
@@ -1,9 +1,18 @@
 package jalview.datamodel;
 
+import java.awt.Color;
+
 public interface ContactListProviderI
 {
 
   /**
+   * 
+   * @return position index for this contact List (usually sequence position or
+   *         alignment column)
+   */
+  int getPosition();
+
+  /**
    * dimension of list where getContactAt(column<getContactHeight()) may return
    * a value
    * 
@@ -19,4 +28,23 @@ public interface ContactListProviderI
    */
   double getContactAt(int column);
 
+  /**
+   * Return positions in local reference corresponding to cStart and cEnd in
+   * matrix data. Positions are base 1 column indices for sequence associated
+   * matrices.
+   * 
+   * @param cStart
+   * @param cEnd
+   * @return int[] { start, end (inclusive) for each contiguous segment}
+   */
+  default int[] getMappedPositionsFor(int cStart, int cEnd)
+  {
+    return new int[] { cStart, cEnd };
+  }
+
+  default Color getColourForGroup()
+  {
+    return null;
+  }
+
 }