X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationChooser.java;h=791421dfeb32c0abb421f50a1e0f84f263dc4902;hb=88153d5bb04acd2b8e7fbc3e6789622b77b6cf58;hp=718e0f09fec5359cd1f910ac26b4fe0b28eb66b7;hpb=37de9310bec3501cbc6381e0c3dcb282fcaad812;p=jalview.git diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index 718e0f0..791421d 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -56,7 +56,8 @@ import javax.swing.JPanel; public class AnnotationChooser extends JPanel { - private static final Font CHECKBOX_FONT = new Font("Serif", Font.BOLD, 12); + private static final Font CHECKBOX_FONT = new Font("Serif", Font.BOLD, + 12); private static final int MY_FRAME_WIDTH = 600; @@ -81,7 +82,7 @@ public class AnnotationChooser extends JPanel private boolean applyToUnselectedSequences; // currently selected 'annotation type' checkboxes - private Map selectedTypes = new HashMap(); + private Map selectedTypes = new HashMap<>(); /** * Constructor. @@ -194,14 +195,7 @@ public class AnnotationChooser extends JPanel { setAnnotationVisibility(true); - // copied from AnnotationLabel.actionPerformed (after show/hide row)... - // TODO should drive this functionality into AlignmentPanel ap.updateAnnotation(); - // this.ap.annotationPanel.adjustPanelHeight(); - // this.ap.alabels.setSize(this.ap.alabels.getSize().width, - // this.ap.annotationPanel.getSize().height); - // this.ap.validate(); - this.ap.paintAlignment(true); } /** @@ -228,11 +222,6 @@ public class AnnotationChooser extends JPanel } } ap.updateAnnotation(); - // // this.ap.annotationPanel.adjustPanelHeight(); - // this.ap.alabels.setSize(this.ap.alabels.getSize().width, - // this.ap.annotationPanel.getSize().height); - // this.ap.validate(); - this.ap.paintAlignment(true); } /** @@ -242,15 +231,13 @@ public class AnnotationChooser extends JPanel * type which are in the application scope (all, selected or unselected * sequences). * - * @param type + * @param dataSourceType */ protected void changeShowHide_actionPerformed() { setAnnotationVisibility(false); - this.ap.updateAnnotation(); - // this.ap.annotationPanel.adjustPanelHeight(); - this.ap.paintAlignment(true); + ap.updateAnnotation(); } /** @@ -355,7 +342,7 @@ public class AnnotationChooser extends JPanel public static List getAnnotationTypes(AlignmentI alignment, boolean sequenceSpecificOnly) { - List result = new ArrayList(); + List result = new ArrayList<>(); for (AlignmentAnnotation aa : alignment.getAlignmentAnnotation()) { if (!sequenceSpecificOnly || aa.sequenceRef != null)