From: amwaterhouse Date: Thu, 25 Jan 2007 16:00:41 +0000 (+0000) Subject: Output annotations X-Git-Tag: Release_2_3~443 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7724430e3293cbb862d0c50c5308a3b3b0417cac;p=jalview.git Output annotations --- 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)