*/
package jalview.schemes;
+import jalview.api.FeatureColourI;
import jalview.datamodel.SequenceFeature;
import java.awt.Color;
updateBounds(min, max);
}
+ public GraduatedColor(FeatureColourI col)
+ {
+ setColourByLabel(col.isColourByLabel());
+ }
+
public Color getMinColor()
{
return new Color(lr, lg, lb);
public boolean isColored(SequenceFeature feature)
{
float val = feature.getScore();
- if (val == Float.NaN)
+ if (Float.isNaN(val))
{
return true;
}
{
return true;
}
- if (this.thrsh == Float.NaN)
+ if (Float.isNaN(this.thrsh))
{
return true;
}
return getMaxColor();
}
float scr = feature.getScore();
- if (scr == Float.NaN)
+ if (Float.isNaN(scr))
{
return getMinColor();
}