X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationChooser.java;h=d9768152af9164f25ea7585d7c093e6db0f44dcb;hb=7fa567506eea0a202c71e6939b961962f515dcec;hp=35b603255e7a2185e5b2fc064a698273feb78db6;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index 35b6032..d976815 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -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. @@ -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) @@ -615,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,