else if (source == loadAnnotations)\r
loadAnnotations();\r
else if (source == outputAnnotations)\r
- outputAnnotations();\r
+ outputAnnotations(true);\r
else if(source == outputFeatures)\r
outputFeatures(true, "Jalview");\r
else if(source==closeMenuItem)\r
\r
}\r
\r
- public void outputAnnotations()\r
+ public String outputAnnotations(boolean displayTextbox)\r
{\r
- CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);\r
- Frame frame = new Frame();\r
- frame.add(cap);\r
- jalview.bin.JalviewLite.addFrame(frame,\r
- "Annotations",\r
- 600, 500);\r
- cap.setText( new AnnotationFile().printAnnotations(\r
- viewport.alignment.getAlignmentAnnotation() ) );\r
+ String annotation = new AnnotationFile().printAnnotations(\r
+ viewport.alignment.getAlignmentAnnotation() );\r
+\r
+ if(displayTextbox)\r
+ {\r
+\r
+ CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);\r
+ Frame frame = new Frame();\r
+ frame.add(cap);\r
+ jalview.bin.JalviewLite.addFrame(frame,\r
+ "Annotations",\r
+ 600, 500);\r
+ cap.setText(annotation);\r
+ }\r
+\r
+ return annotation;\r
}\r
\r
public String outputFeatures(boolean displayTextbox, String format)\r