X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FAnnotationExporter.java;h=9c6231a2e066a9e0d8892f493cb06389082669e7;hb=1a802c6cf08e703f6b722a91b1e7f58f76356476;hp=de6aaa09bb059dcc54c3ea93920940e827fef3ae;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/gui/AnnotationExporter.java b/src/jalview/gui/AnnotationExporter.java index de6aaa0..9c6231a 100755 --- a/src/jalview/gui/AnnotationExporter.java +++ b/src/jalview/gui/AnnotationExporter.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) - * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle * * This file is part of Jalview. * @@ -18,6 +18,7 @@ package jalview.gui; import java.util.*; +import java.util.List; import java.awt.*; import java.awt.event.*; @@ -44,7 +45,7 @@ public class AnnotationExporter extends JPanel AlignmentAnnotation[] annotations; - Vector sequenceGroups; + List sequenceGroups; Hashtable alignmentProperties; @@ -61,7 +62,7 @@ public class AnnotationExporter extends JPanel frame = new JInternalFrame(); frame.setContentPane(this); frame.setLayer(JLayeredPane.PALETTE_LAYER); - Desktop.addInternalFrame(frame, "", 260, 125); + Desktop.addInternalFrame(frame, "", frame.getPreferredSize().width, frame.getPreferredSize().height); } public void exportFeatures(AlignmentPanel ap) @@ -73,7 +74,7 @@ public class AnnotationExporter extends JPanel } public void exportAnnotations(AlignmentPanel ap, - AlignmentAnnotation[] annotations, Vector sequenceGroups, + AlignmentAnnotation[] annotations, List list, Hashtable alProperties) { this.ap = ap; @@ -81,7 +82,7 @@ public class AnnotationExporter extends JPanel GFFFormat.setVisible(false); CSVFormat.setVisible(true); this.annotations = annotations; - this.sequenceGroups = sequenceGroups; + this.sequenceGroups = list; this.alignmentProperties = alProperties; frame.setTitle("Export Annotations"); } @@ -105,13 +106,13 @@ public class AnnotationExporter extends JPanel { if (GFFFormat.isSelected()) { - text = new FeaturesFile().printGFFFormat(ap.av.alignment + text = new FeaturesFile().printGFFFormat(ap.av.getAlignment() .getDataset().getSequencesArray(), getDisplayedFeatureCols(), true, ap.av.isShowNpFeats());// ap.av.featuresDisplayed//); } else { - text = new FeaturesFile().printJalviewFormat(ap.av.alignment + text = new FeaturesFile().printJalviewFormat(ap.av.getAlignment() .getDataset().getSequencesArray(), getDisplayedFeatureCols(), true, ap.av.isShowNpFeats()); // ap.av.featuresDisplayed); } @@ -152,13 +153,13 @@ public class AnnotationExporter extends JPanel { if (GFFFormat.isSelected()) { - text = new FeaturesFile().printGFFFormat(ap.av.alignment + text = new FeaturesFile().printGFFFormat(ap.av.getAlignment() .getDataset().getSequencesArray(), getDisplayedFeatureCols(), true, ap.av.isShowNpFeats()); } else { - text = new FeaturesFile().printJalviewFormat(ap.av.alignment + text = new FeaturesFile().printJalviewFormat(ap.av.getAlignment() .getDataset().getSequencesArray(), getDisplayedFeatureCols(), true, ap.av.isShowNpFeats()); } @@ -196,7 +197,7 @@ public class AnnotationExporter extends JPanel private Hashtable getDisplayedFeatureCols() { Hashtable fcols = new Hashtable(); - if (ap.av.featuresDisplayed==null) + if (ap.av.featuresDisplayed == null) { return fcols; } @@ -225,7 +226,8 @@ public class AnnotationExporter extends JPanel private void jbInit() throws Exception { - this.setLayout(flowLayout1); + this.setLayout(new BorderLayout()); + toFile.setText("to File"); toFile.addActionListener(new ActionListener() { @@ -273,8 +275,8 @@ public class AnnotationExporter extends JPanel buttonGroup.add(jalviewFormat); buttonGroup.add(GFFFormat); buttonGroup.add(CSVFormat); - this.add(jPanel3, null); - this.add(jPanel1, null); + this.add(jPanel3, BorderLayout.CENTER); + this.add(jPanel1, BorderLayout.SOUTH); } JPanel jPanel1 = new JPanel();