X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FAnnotationColourGradient.java;h=ac88d96b81898a2467db6bdfb7d6f6e22d73f62b;hb=e4dca3706ab423352c26ac100f3ca5a3e7c3d2c4;hp=3cb7e174ebdc895694bf5f9abef58a944e1cebf4;hpb=5963dedafa1af673a588f0d30710f7391eb822c4;p=jalview.git diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 3cb7e17..ac88d96 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -85,6 +85,30 @@ public class AnnotationColourGradient extends ResidueColourScheme } + + public String getAnnotation() + { + return annotation.label; + } + + public int getAboveThreshold() + { + return aboveAnnotationThreshold; + } + + public float getAnnotationThreshold() + { + if(annotationThreshold==null) + return 0; + else + return annotationThreshold.value; + } + + public ColourSchemeI getBaseColour() + { + return colourScheme; + } + public Color getMinColour() { return new Color( (int) r1, (int) g1, (int) b1); @@ -117,11 +141,13 @@ public class AnnotationColourGradient extends ResidueColourScheme */ public Color findColour(String n, int j) { + currentColour = Color.white; + if ((threshold == 0) || aboveThreshold(n, j)) { - if( j+1>annotation.annotations.length || annotation.annotations[j]==null) - currentColour = Color.white; - else + if( j=annotationThreshold.value) @@ -148,17 +174,9 @@ public class AnnotationColourGradient extends ResidueColourScheme currentColour = new Color( (int) dr, (int) dg, (int) db); } - else - currentColour = Color.white; } - else - currentColour = Color.white; } } - else - { - return Color.white; - } if(conservationColouring) applyConservation(j);