JAL-2016 first draft of pre-set feature colour scheme
[jalview.git] / src / jalview / api / FeatureColourI.java
1 package jalview.api;
2
3 import java.awt.Color;
4
5 public interface FeatureColourI
6 {
7
8   /**
9    * Answers true when either isColourByLabel, isAboveThreshold or
10    * isBelowThreshold answers true
11    * 
12    * @return
13    */
14   boolean isGraduatedColour();
15
16   /**
17    * Returns the feature colour (when isGraduatedColour answers false)
18    * 
19    * @return
20    */
21   Color getColour();
22
23   /**
24    * Returns the minimum colour (when isGraduatedColour answers true)
25    * 
26    * @return
27    */
28   Color getMinColour();
29
30   /**
31    * Returns the maximum colour (when isGraduatedColour answers true)
32    * 
33    * @return
34    */
35   Color getMaxColour();
36
37   /**
38    * Answers true if the feature is coloured by label (description); only
39    * applicable when isGraduatedColour answers true
40    * 
41    * @return
42    */
43   boolean isColourByLabel();
44
45   /**
46    * Answers true if the feature is coloured below a threshold value; only
47    * applicable when isGraduatedColour answers true
48    * 
49    * @return
50    */
51   boolean isBelowThreshold();
52
53   /**
54    * Answers true if the feature is coloured above a threshold value; only
55    * applicable when isGraduatedColour answers true
56    * 
57    * @return
58    */
59   boolean isAboveThreshold();
60
61   /**
62    * Answers true if the threshold is the min (or max) of the colour range; only
63    * applicable when isGraduatedColour answers true
64    * 
65    * @return
66    */
67   boolean isThresholdMinMax();
68
69   /**
70    * Returns the threshold value (if any), else zero
71    * 
72    * @return
73    */
74   float getThreshold();
75
76   /**
77    * Answers true if ?
78    * 
79    * @return
80    */
81   boolean isLowToHigh();
82 }