X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationChooser.java;h=d9768152af9164f25ea7585d7c093e6db0f44dcb;hb=6ff51fcc01238abb8f337aca7b6984fdc0b8368a;hp=26796deef43ab4439e44f3a216923b2c1f504fae;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index 26796de..d976815 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -20,11 +20,6 @@ */ package jalview.gui; -import jalview.datamodel.AlignmentAnnotation; -import jalview.datamodel.AlignmentI; -import jalview.datamodel.SequenceGroup; -import jalview.util.MessageManager; - import java.awt.BorderLayout; import java.awt.Checkbox; import java.awt.CheckboxGroup; @@ -45,6 +40,11 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JPanel; +import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SequenceGroup; +import jalview.util.MessageManager; + /** * A panel that allows the user to select which sequence-associated annotation * rows to show or hide. @@ -82,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. @@ -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 getAnnotationTypes(AlignmentI alignment, boolean sequenceSpecificOnly) { - List result = new ArrayList(); + List result = new ArrayList<>(); for (AlignmentAnnotation aa : alignment.getAlignmentAnnotation()) { if (!sequenceSpecificOnly || aa.sequenceRef != null) @@ -616,6 +602,7 @@ public class AnnotationChooser extends JPanel private void showFrame() { frame = new JInternalFrame(); + frame.setFrameIcon(null); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Desktop.addInternalFrame(frame,