X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fappletgui%2FAnnotationColourChooser.java;h=6eca05ed752a4be98ab11e3025a92cf426891bd9;hb=da1ce6ca071deb35b983a41f6eeed43f30b3c3b2;hp=8de751a74c264438a823d3d2e29fb478316a418c;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColourChooser.java b/src/jalview/appletgui/AnnotationColourChooser.java index 8de751a..6eca05e 100644 --- a/src/jalview/appletgui/AnnotationColourChooser.java +++ b/src/jalview/appletgui/AnnotationColourChooser.java @@ -22,6 +22,7 @@ package jalview.appletgui; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.SequenceGroup; +import jalview.gui.Preferences; import jalview.schemes.AnnotationColourGradient; import jalview.schemes.ColourSchemeI; import jalview.util.MessageManager; @@ -85,7 +86,7 @@ public class AnnotationColourChooser extends Panel implements oldcs = av.getGlobalColourScheme(); if (av.getAlignment().getGroups() != null) { - oldgroupColours = new HashMap(); + oldgroupColours = new HashMap<>(); for (SequenceGroup sg : ap.av.getAlignment().getGroups()) { oldgroupColours.put(sg, sg.getColourScheme()); @@ -180,8 +181,8 @@ public class AnnotationColourChooser extends Panel implements // TODO remove duplication with gui.AnnotationRowFilter // TODO add 'per sequence only' option / parameter - annotationLabels = new HashMap(); - Vector list = new Vector(); + annotationLabels = new HashMap<>(); + Vector list = new Vector<>(); AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation(); if (anns == null) { @@ -217,9 +218,9 @@ public class AnnotationColourChooser extends Panel implements private void setDefaultMinMax() { minColour.setBackground(av.applet.getDefaultColourParameter( - "ANNOTATIONCOLOUR_MIN", Color.orange)); + Preferences.ANNOTATIONCOLOUR_MIN, Color.orange)); maxColour.setBackground(av.applet - .getDefaultColourParameter("ANNOTATIONCOLOUR_MAX", Color.red)); + .getDefaultColourParameter(Preferences.ANNOTATIONCOLOUR_MAX, Color.red)); } @@ -376,7 +377,7 @@ public class AnnotationColourChooser extends Panel implements else if (evt.getSource() == cancel) { reset(); - ap.paintAlignment(true); + ap.paintAlignment(true, true); frame.setVisible(false); } @@ -417,7 +418,7 @@ public class AnnotationColourChooser extends Panel implements } currentAnnotation.threshold.value = slider.getValue() / 1000f; - ap.paintAlignment(false); + ap.paintAlignment(false, false); } } @@ -559,7 +560,7 @@ public class AnnotationColourChooser extends Panel implements // update colours in linked windows ap.alignmentChanged(); - ap.paintAlignment(true); + ap.paintAlignment(true, true); } void reset() @@ -572,7 +573,7 @@ public class AnnotationColourChooser extends Panel implements sg.setColourScheme(oldgroupColours.get(sg)); } } - ap.paintAlignment(true); + ap.paintAlignment(true, true); } @Override @@ -588,7 +589,7 @@ public class AnnotationColourChooser extends Panel implements @Override public void mouseReleased(MouseEvent evt) { - ap.paintAlignment(true); + ap.paintAlignment(true, true); } @Override