JAL-4375 Add an AnnotationColouringI interface, and generic AnnotationColouringRanges...
[jalview.git] / src / jalview / datamodel / annotations / AnnotationColouringI.java
1 package jalview.datamodel.annotations;
2
3 import java.awt.Color;
4 import java.util.List;
5 import java.util.Map;
6
7 public interface AnnotationColouringI
8 {
9   /**
10    * Return the colour associated with this value
11    * 
12    * @param val
13    * @return
14    */
15   public Color valueToColour(float val);
16
17   /**
18    * Given two values, val1 and val2, returns a list of (float,Color) pairs (as
19    * Map.Entry objects). The float is a proportional distance (should start with
20    * 0 and end with 1) and the Color is the color change from that point.
21    * 
22    * @param val1
23    * @param val2
24    * @return
25    */
26   public List<Map.Entry<Float, Color>> rangeColours(float val1, float val2);
27 }