git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1563 further modificaiton of the uniprot data column configuration file
[jalview.git]
/
src
/
jalview
/
schemes
/
GraduatedColor.java
diff --git
a/src/jalview/schemes/GraduatedColor.java
b/src/jalview/schemes/GraduatedColor.java
index
4f1cb58
..
2d1c572
100644
(file)
--- a/
src/jalview/schemes/GraduatedColor.java
+++ b/
src/jalview/schemes/GraduatedColor.java
@@
-20,6
+20,7
@@
*/
package jalview.schemes;
*/
package jalview.schemes;
+import jalview.api.FeatureColourI;
import jalview.datamodel.SequenceFeature;
import java.awt.Color;
import jalview.datamodel.SequenceFeature;
import java.awt.Color;
@@
-118,6
+119,11
@@
public class GraduatedColor
updateBounds(min, max);
}
updateBounds(min, max);
}
+ public GraduatedColor(FeatureColourI col)
+ {
+ setColourByLabel(col.isColourByLabel());
+ }
+
public Color getMinColor()
{
return new Color(lr, lg, lb);
public Color getMinColor()
{
return new Color(lr, lg, lb);
@@
-145,7
+151,7
@@
public class GraduatedColor
public boolean isColored(SequenceFeature feature)
{
float val = feature.getScore();
public boolean isColored(SequenceFeature feature)
{
float val = feature.getScore();
- if (val == Float.NaN)
+ if (Float.isNaN(val))
{
return true;
}
{
return true;
}
@@
-153,7
+159,7
@@
public class GraduatedColor
{
return true;
}
{
return true;
}
- if (this.thrsh == Float.NaN)
+ if (Float.isNaN(this.thrsh))
{
return true;
}
{
return true;
}
@@
-211,7
+217,7
@@
public class GraduatedColor
return getMaxColor();
}
float scr = feature.getScore();
return getMaxColor();
}
float scr = feature.getScore();
- if (scr == Float.NaN)
+ if (Float.isNaN(scr))
{
return getMinColor();
}
{
return getMinColor();
}