git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added action for saving the current session as a vamsas archive.
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationExporter.java
diff --git
a/src/jalview/gui/AnnotationExporter.java
b/src/jalview/gui/AnnotationExporter.java
index
41689c5
..
ab3f0d1
100755
(executable)
--- a/
src/jalview/gui/AnnotationExporter.java
+++ b/
src/jalview/gui/AnnotationExporter.java
@@
-28,6
+28,13
@@
import javax.swing.*;
import jalview.datamodel.*;
\r
import jalview.io.*;
\r
\r
import jalview.datamodel.*;
\r
import jalview.io.*;
\r
\r
+/**
\r
+ *
\r
+ * GUI dialog for exporting features or alignment annotations depending upon which method is called.
\r
+ *
\r
+ * @author AMW
\r
+ *
\r
+ */
\r
public class AnnotationExporter
\r
extends JPanel
\r
{
\r
public class AnnotationExporter
\r
extends JPanel
\r
{
\r
@@
-61,6
+68,7
@@
public class AnnotationExporter
{
\r
this.ap = ap;
\r
features = true;
\r
{
\r
this.ap = ap;
\r
features = true;
\r
+ CSVFormat.setVisible(false);
\r
frame.setTitle("Export Features");
\r
}
\r
\r
frame.setTitle("Export Features");
\r
}
\r
\r
@@
-72,6
+80,7
@@
public class AnnotationExporter
this.ap = ap;
\r
features = false;
\r
GFFFormat.setVisible(false);
\r
this.ap = ap;
\r
features = false;
\r
GFFFormat.setVisible(false);
\r
+ CSVFormat.setVisible(true);
\r
this.annotations = annotations;
\r
this.sequenceGroups = sequenceGroups;
\r
this.alignmentProperties = alProperties;
\r
this.annotations = annotations;
\r
this.sequenceGroups = sequenceGroups;
\r
this.alignmentProperties = alProperties;
\r
@@
-110,10
+119,15
@@
public class AnnotationExporter
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- text = new AnnotationFile().printAnnotations(
\r
+ if (CSVFormat.isSelected())
\r
+ {
\r
+ text = new AnnotationFile().printCSVAnnotations(annotations);
\r
+ } else {
\r
+ text = new AnnotationFile().printAnnotations(
\r
annotations,
\r
sequenceGroups,
\r
alignmentProperties);
\r
annotations,
\r
sequenceGroups,
\r
alignmentProperties);
\r
+ }
\r
}
\r
\r
try
\r
}
\r
\r
try
\r
@@
-153,10
+167,15
@@
public class AnnotationExporter
}
\r
else if (!features)
\r
{
\r
}
\r
else if (!features)
\r
{
\r
- text = new AnnotationFile().printAnnotations(
\r
+ if (CSVFormat.isSelected())
\r
+ {
\r
+ text = new AnnotationFile().printCSVAnnotations(annotations);
\r
+ } else {
\r
+ text = new AnnotationFile().printAnnotations(
\r
annotations,
\r
sequenceGroups,
\r
alignmentProperties);
\r
annotations,
\r
sequenceGroups,
\r
alignmentProperties);
\r
+ }
\r
}
\r
\r
CutAndPasteTransfer cap = new CutAndPasteTransfer();
\r
}
\r
\r
CutAndPasteTransfer cap = new CutAndPasteTransfer();
\r
@@
-214,6
+233,8
@@
public class AnnotationExporter
jalviewFormat.setText("Jalview");
\r
GFFFormat.setOpaque(false);
\r
GFFFormat.setText("GFF");
\r
jalviewFormat.setText("Jalview");
\r
GFFFormat.setOpaque(false);
\r
GFFFormat.setText("GFF");
\r
+ CSVFormat.setOpaque(false);
\r
+ CSVFormat.setText("CSV(Spreadsheet)");
\r
jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
\r
jLabel1.setText("Format: ");
\r
this.setBackground(Color.white);
\r
jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
\r
jLabel1.setText("Format: ");
\r
this.setBackground(Color.white);
\r
@@
-226,8
+247,10
@@
public class AnnotationExporter
jPanel3.add(jLabel1);
\r
jPanel3.add(jalviewFormat);
\r
jPanel3.add(GFFFormat);
\r
jPanel3.add(jLabel1);
\r
jPanel3.add(jalviewFormat);
\r
jPanel3.add(GFFFormat);
\r
+ jPanel3.add(CSVFormat);
\r
buttonGroup.add(jalviewFormat);
\r
buttonGroup.add(GFFFormat);
\r
buttonGroup.add(jalviewFormat);
\r
buttonGroup.add(GFFFormat);
\r
+ buttonGroup.add(CSVFormat);
\r
this.add(jPanel3, null);
\r
this.add(jPanel1, null);
\r
}
\r
this.add(jPanel3, null);
\r
this.add(jPanel1, null);
\r
}
\r
@@
-239,6
+262,7
@@
public class AnnotationExporter
ButtonGroup buttonGroup = new ButtonGroup();
\r
JRadioButton jalviewFormat = new JRadioButton();
\r
JRadioButton GFFFormat = new JRadioButton();
\r
ButtonGroup buttonGroup = new ButtonGroup();
\r
JRadioButton jalviewFormat = new JRadioButton();
\r
JRadioButton GFFFormat = new JRadioButton();
\r
+ JRadioButton CSVFormat = new JRadioButton();
\r
JLabel jLabel1 = new JLabel();
\r
JPanel jPanel3 = new JPanel();
\r
FlowLayout flowLayout1 = new FlowLayout();
\r
JLabel jLabel1 = new JLabel();
\r
JPanel jPanel3 = new JPanel();
\r
FlowLayout flowLayout1 = new FlowLayout();
\r