3 import jalview.datamodel.SequenceFeature;
5 public interface FeatureColourI
9 * Answers true when either isColourByLabel, isAboveThreshold or
10 * isBelowThreshold answers true
14 boolean isGraduatedColour();
17 * Returns the feature colour (when isGraduatedColour answers false)
24 * Returns the minimum colour (when isGraduatedColour answers true)
28 ColorI getMinColour();
31 * Returns the maximum colour (when isGraduatedColour answers true)
35 ColorI getMaxColour();
38 * Answers true if the feature is coloured by label (description); only
39 * applicable when isGraduatedColour answers true
43 boolean isColourByLabel();
46 * Answers true if the feature is coloured below a threshold value; only
47 * applicable when isGraduatedColour answers true
51 boolean isBelowThreshold();
54 * Answers true if the feature is coloured above a threshold value; only
55 * applicable when isGraduatedColour answers true
59 boolean isAboveThreshold();
62 * Answers true if the threshold is the min (or max) of the colour range; only
63 * applicable when isGraduatedColour answers true
67 boolean isThresholdMinMax();
70 * Returns the threshold value (if any), else zero
79 * Returns the minimum score of the graduated colour range
86 * Answers true if either isAboveThreshold or isBelowThreshold answers true
90 boolean hasThreshold();
93 * Returns the computed colour for the given sequence feature
98 ColorI getColor(SequenceFeature feature);
101 * Answers true if the feature has a simple colour, or is coloured by label,
102 * or has a graduated colour and the score of this feature instance is within
103 * the range to render (if any), i.e. does not lie below or above any
109 boolean isColored(SequenceFeature feature);
112 * Update the min-max range for a graduated colour scheme
117 void updateBounds(float min, float max);
120 * Returns the colour in Jalview features file format
124 String toJalviewFormat(String featureType);
126 void setThreshold(float f);
128 boolean isAutoScaled();
130 void setAutoScaled(boolean b);
132 boolean isSimpleColour();
134 void setAboveThreshold(boolean b);
136 void setThresholdMinMax(boolean b);
138 void setBelowThreshold(boolean b);
140 void setColourByLabel(boolean b);
142 void setGraduatedColour(boolean b);