X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FAnnotationColourGradient.java;h=20b08857c757ec16f291d6962d625118173f2762;hb=d70d7e5bc8da1189f44709b6ec59ea1e23f6f557;hp=789667e0b2d49296053fa319b45ff933ebf0b319;hpb=2bdd8fe3e044068769ca42c57bfa1ef5f52e2f2d;p=jalview.git diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 789667e..20b0885 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle +* Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -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); @@ -102,7 +126,7 @@ public class AnnotationColourGradient extends ResidueColourScheme * * @return DOCUMENT ME! */ - public Color findColour(String n) + public Color findColour(char c) { return Color.red; } @@ -115,15 +139,15 @@ public class AnnotationColourGradient extends ResidueColourScheme * * @return DOCUMENT ME! */ - public Color findColour(String n, int j) + public Color findColour(char c, int j) { - currentColour = Color.white; + Color currentColour = Color.white; - if ((threshold == 0) || aboveThreshold(n, j)) + if ((threshold == 0) || aboveThreshold(c, j)) { if( j=annotationThreshold.value) @@ -131,7 +155,7 @@ public class AnnotationColourGradient extends ResidueColourScheme { if(colourScheme!=null) { - currentColour = colourScheme.findColour(n, j); + currentColour = colourScheme.findColour(c, j); } else if(range!=0) { @@ -155,7 +179,7 @@ public class AnnotationColourGradient extends ResidueColourScheme } if(conservationColouring) - applyConservation(j); + currentColour = applyConservation(currentColour, j); return currentColour; }