X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationColourChooser.java;fp=src%2Fjalview%2Fgui%2FAnnotationColourChooser.java;h=153f70c655d0c83909a1804d85db41be8dfe90d1;hb=0efc6021e63ff62bb2e275501586c1900561b303;hp=f0887915c40ce6b8f833613767dbcf2b9d9b6f26;hpb=771d1758a42abc6e3e330dd6c5117734acf0067f;p=jalview.git diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index f088791..153f70c 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -79,7 +79,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter oldcs = av.getGlobalColourScheme(); if (av.getAlignment().getGroups() != null) { - oldgroupColours = new Hashtable(); + oldgroupColours = new Hashtable<>(); for (SequenceGroup sg : ap.av.getAlignment().getGroups()) { if (sg.getColourScheme() != null) @@ -122,7 +122,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter } Vector annotItems = getAnnotationItems( seqAssociated.isSelected()); - annotations = new JComboBox(annotItems); + annotations = new JComboBox<>(annotItems); populateThresholdComboBox(threshold); @@ -341,7 +341,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter getCurrentAnnotation().threshold.value = slider.getValue() / 1000f; propagateSeqAssociatedThreshold(updateAllAnnotation, getCurrentAnnotation()); - ap.paintAlignment(false); + ap.paintAlignment(false, false); } } @@ -415,12 +415,9 @@ public class AnnotationColourChooser extends AnnotationRowFilter colorAlignmentContaining(getCurrentAnnotation(), selectedThresholdItem); ap.alignmentChanged(); - // ensure all associated views (overviews, structures, etc) are notified of - // updated colours. - ap.paintAlignment(true); } - protected boolean colorAlignmentContaining(AlignmentAnnotation currentAnn, + protected void colorAlignmentContaining(AlignmentAnnotation currentAnn, int selectedThresholdOption) { @@ -456,25 +453,10 @@ public class AnnotationColourChooser extends AnnotationRowFilter { continue; } - - if (useOriginalColours.isSelected()) - { - sg.setColourScheme(new AnnotationColourGradient(currentAnn, - sg.getColourScheme(), selectedThresholdOption)); - ((AnnotationColourGradient) sg.cs) - .setSeqAssociated(seqAssociated.isSelected()); - } - else - { - sg.setColourScheme(new AnnotationColourGradient(currentAnn, - minColour.getBackground(), maxColour.getBackground(), - selectedThresholdOption)); - ((AnnotationColourGradient) sg.cs) - .setSeqAssociated(seqAssociated.isSelected()); - } + sg.setColourScheme( + acg.getInstance(sg, ap.av.getHiddenRepSequences())); } } - return false; } }