Merge branch 'features/JAL-4034_improve_3dbeacons_button_and_ux' into develop
[jalview.git] / src / jalview / gui / AnnotationChooser.java
index 26796de..791421d 100644 (file)
@@ -82,7 +82,7 @@ public class AnnotationChooser extends JPanel
   private boolean applyToUnselectedSequences;
 
   // currently selected 'annotation type' checkboxes
-  private Map<String, String> selectedTypes = new HashMap<String, String>();
+  private Map<String, String> selectedTypes = new HashMap<>();
 
   /**
    * Constructor.
@@ -195,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);
   }
 
   /**
@@ -229,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);
   }
 
   /**
@@ -249,9 +237,7 @@ public class AnnotationChooser extends JPanel
   {
     setAnnotationVisibility(false);
 
-    this.ap.updateAnnotation();
-    // this.ap.annotationPanel.adjustPanelHeight();
-    this.ap.paintAlignment(true);
+    ap.updateAnnotation();
   }
 
   /**
@@ -356,7 +342,7 @@ public class AnnotationChooser extends JPanel
   public static List<String> getAnnotationTypes(AlignmentI alignment,
           boolean sequenceSpecificOnly)
   {
-    List<String> result = new ArrayList<String>();
+    List<String> result = new ArrayList<>();
     for (AlignmentAnnotation aa : alignment.getAlignmentAnnotation())
     {
       if (!sequenceSpecificOnly || aa.sequenceRef != null)