X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationColumnChooser.java;h=f1f78fa1d4fa450e9e7956f9e9ddeb5ad0f7c9fe;hb=afe4b88500a5d61bc8d312909cfdde2b7cdd53df;hp=0483aa60daea3b3549b5b9c004d4ce584f0d0cd0;hpb=d8fcaf315395d614059f4345c20ff2f86a4476f1;p=jalview.git diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index 0483aa6..f1f78fa 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -96,9 +96,11 @@ public class AnnotationColumnChooser extends AnnotationRowFilter public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap) { - this(av,ap,null); + this(av, ap, null); } - public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap, AlignmentAnnotation selectedAnnotation) + + public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap, + AlignmentAnnotation selectedAnnotation) { super(av, ap); frame = new JInternalFrame(); @@ -120,7 +122,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter } setOldHiddenColumns(av.getAlignment().getHiddenColumns()); adjusting = true; - + setAnnotations(new JComboBox<>(getAnnotationItems(false))); populateThresholdComboBox(threshold); AnnotationColumnChooser lastChooser = av @@ -139,14 +141,16 @@ public class AnnotationColumnChooser extends AnnotationRowFilter percentThreshold .setSelected(lastChooser.percentThreshold.isSelected()); } - if (selectedAnnotation!=null) + if (selectedAnnotation != null) { - try { + try + { setCurrentAnnotation(selectedAnnotation); - annotations.setSelectedItem(getAnnotationMenuLabel(selectedAnnotation)); + annotations.setSelectedItem( + getAnnotationMenuLabel(selectedAnnotation)); } catch (Exception x) { - Console.error("Couldn't select annotation in column chooser",x); + Console.error("Couldn't select annotation in column chooser", x); } } @@ -869,6 +873,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter public static void displayFor(AlignViewport av, AlignmentPanel ap, AlignmentAnnotation alignmentAnnotation) { - AnnotationColumnChooser colchooser = new AnnotationColumnChooser(av, ap, alignmentAnnotation); + AnnotationColumnChooser colchooser = new AnnotationColumnChooser(av, ap, + alignmentAnnotation); } }