X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColourChooser.java;h=487b75ccc3cd25709d5913f1a943726d89f8df47;hb=cee29c9fa89ed1d1df7b3af9f97055d8cd6eb77e;hp=79d2f1f986468d365b34d5987abfc887139dbc32;hpb=5873fba98bc2a645aaebef32da0cb7dddb9d9de5;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java index 79d2f1f..487b75c 100644 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -81,9 +81,9 @@ public class AnnotationColourChooser extends Panel implements oldgroupColours = new Hashtable(); for (SequenceGroup sg : ap.av.getAlignment().getGroups()) { - if (sg.cs != null) + if (sg.getColourScheme() != null) { - oldgroupColours.put(sg, sg.cs); + oldgroupColours.put(sg, sg.getColourScheme()); } else { @@ -487,8 +487,6 @@ public class AnnotationColourChooser extends Panel implements AnnotationColourGradient acg = null; if (currentColours.getState()) { - acg = new AnnotationColourGradient(currentAnnotation, - av.getGlobalColourScheme(), aboveThreshold); } else { @@ -513,21 +511,21 @@ public class AnnotationColourChooser extends Panel implements for (SequenceGroup sg : ap.av.getAlignment().getGroups()) { - if (sg.cs == null) + if (sg.getColourScheme() == null) { continue; } if (currentColours.getState()) { - sg.cs = new AnnotationColourGradient(currentAnnotation, sg.cs, - aboveThreshold); + sg.setColourScheme(new AnnotationColourGradient( + currentAnnotation, sg.getColourScheme(), aboveThreshold)); } else { - sg.cs = new AnnotationColourGradient(currentAnnotation, - minColour.getBackground(), maxColour.getBackground(), - aboveThreshold); + sg.setColourScheme(new AnnotationColourGradient( + currentAnnotation, minColour.getBackground(), maxColour + .getBackground(), aboveThreshold)); } } @@ -548,12 +546,12 @@ public class AnnotationColourChooser extends Panel implements Object cs = oldgroupColours.get(sg); if (cs instanceof ColourSchemeI) { - sg.cs = (ColourSchemeI) cs; + sg.setColourScheme((ColourSchemeI) cs); } else { // probably the "null" string we set it to if it was null originally. - sg.cs = null; + sg.setColourScheme(null); } } }