X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationChooser.java;h=233f2807365a3e010e1001b080acbb5eb3261915;hb=0751c58086542f9e0466201b624f84d1efd547bb;hp=26796deef43ab4439e44f3a216923b2c1f504fae;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/gui/AnnotationChooser.java b/src/jalview/gui/AnnotationChooser.java index 26796de..233f280 100644 --- a/src/jalview/gui/AnnotationChooser.java +++ b/src/jalview/gui/AnnotationChooser.java @@ -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) @@ -619,8 +605,8 @@ public class AnnotationChooser extends JPanel frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); Desktop.addInternalFrame(frame, - MessageManager.getString("label.choose_annotations"), - MY_FRAME_WIDTH, MY_FRAME_HEIGHT, true); + MessageManager.getString("label.choose_annotations"), Desktop.FRAME_MAKE_VISIBLE, + MY_FRAME_WIDTH, MY_FRAME_HEIGHT, Desktop.FRAME_ALLOW_RESIZE, Desktop.FRAME_SET_MIN_SIZE_300); } protected void setShowSelected(boolean showSelected)