From: amwaterhouse Date: Thu, 25 Jan 2007 16:02:21 +0000 (+0000) Subject: load/get Annotation X-Git-Tag: Release_2_3~441 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9730ab23fa7a61eaede121471fdae48a5eea7dba;p=jalview.git load/get Annotation --- diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index ef7f582..de9a4a7 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -43,6 +43,7 @@ public class JalviewLite extends Applet /////////////////////////////////////////// //The following public methods maybe called //externally, eg via javascript in HTML page + public String getSelectedSequences() { StringBuffer result = new StringBuffer(""); @@ -82,11 +83,31 @@ public class JalviewLite extends Applet } } + public void loadAnnotation(String annotation) + { + if (new AnnotationFile().readAnnotationFile( + currentAlignFrame.getAlignViewport().getAlignment(), annotation, + AppletFormatAdapter.PASTE)) + { + currentAlignFrame.alignPanel.fontChanged(); + currentAlignFrame.alignPanel.setScrollValues(0, 0); + } + else + { + currentAlignFrame.parseFeaturesFile(annotation, AppletFormatAdapter.PASTE); + } + } + public String getFeatures(String format) { return currentAlignFrame.outputFeatures(false, format); } + public String getAnnotation() + { + return currentAlignFrame.outputAnnotations(false); + } + public void loadAlignment(String text, String title) { Alignment al = null; @@ -103,11 +124,11 @@ public class JalviewLite extends Applet } } - //////////////////////////////////////////////// //////////////////////////////////////////////// + static int lastFrameX = 200; static int lastFrameY = 200; boolean fileFound = true;