X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignFrame.java;h=4115999e4cc0bb04b28c8c49fd3c96cf2cdb564b;hb=7724430e3293cbb862d0c50c5308a3b3b0417cac;hp=479d77180df9706629d82684060638065275fdcf;hpb=a1e45ca742b795ce3e38cca47805d3d52ea0f66e;p=jalview.git diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 479d771..4115999 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -502,7 +502,7 @@ public void itemStateChanged(ItemEvent evt) else if (source == loadAnnotations) loadAnnotations(); else if (source == outputAnnotations) - outputAnnotations(); + outputAnnotations(true); else if(source == outputFeatures) outputFeatures(true, "Jalview"); else if(source==closeMenuItem) @@ -670,16 +670,24 @@ public void itemStateChanged(ItemEvent evt) } - public void outputAnnotations() + public String outputAnnotations(boolean displayTextbox) { - CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this); - Frame frame = new Frame(); - frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, - "Annotations", - 600, 500); - cap.setText( new AnnotationFile().printAnnotations( - viewport.alignment.getAlignmentAnnotation() ) ); + String annotation = new AnnotationFile().printAnnotations( + viewport.alignment.getAlignmentAnnotation() ); + + if(displayTextbox) + { + + CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this); + Frame frame = new Frame(); + frame.add(cap); + jalview.bin.JalviewLite.addFrame(frame, + "Annotations", + 600, 500); + cap.setText(annotation); + } + + return annotation; } public String outputFeatures(boolean displayTextbox, String format)