JAL-1628 employ new AnnotationFile reader method to allow the current view's ColumnSe...
authorJim Procter <jprocter@dundee.ac.uk>
Sun, 18 Jan 2015 15:43:17 +0000 (15:43 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Sun, 18 Jan 2015 15:43:17 +0000 (15:43 +0000)
src/jalview/appletgui/CutAndPasteTransfer.java
src/jalview/bin/JalviewLite.java
src/jalview/gui/AlignFrame.java
src/jalview/io/packed/ParsePackedSet.java

index 636dd7f..ce2a3ac 100644 (file)
@@ -203,8 +203,8 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
       }
       if (tcf == null)
       {
-        if (new AnnotationFile().readAnnotationFile(
-                alignFrame.viewport.getAlignment(), textarea.getText(),
+        if (new AnnotationFile().annotateAlignmentView(alignFrame.viewport,
+                textarea.getText(),
                 jalview.io.AppletFormatAdapter.PASTE))
         {
           alignFrame.alignPanel.fontChanged();
index 833dd7e..dab649e 100644 (file)
@@ -709,8 +709,8 @@ public class JalviewLite extends Applet implements
    */
   public void loadAnnotationFrom(AlignFrame alf, String annotation)
   {
-    if (new AnnotationFile().readAnnotationFile(alf.getAlignViewport()
-            .getAlignment(), annotation, AppletFormatAdapter.PASTE))
+    if (new AnnotationFile().annotateAlignmentView(alf.getAlignViewport(),
+            annotation, AppletFormatAdapter.PASTE))
     {
       alf.alignPanel.fontChanged();
       alf.alignPanel.setScrollValues(0, 0);
@@ -1999,8 +1999,8 @@ public class JalviewLite extends Applet implements
         {
           param = setProtocolState(param);
 
-          if (new AnnotationFile().readAnnotationFile(
-                  newAlignFrame.viewport.getAlignment(), param, protocol))
+          if (new AnnotationFile().annotateAlignmentView(
+                  newAlignFrame.viewport, param, protocol))
           {
             newAlignFrame.alignPanel.fontChanged();
             newAlignFrame.alignPanel.setScrollValues(0, 0);
index 269e103..5c42418 100644 (file)
@@ -5148,7 +5148,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       // try to parse as annotation.
       boolean isAnnotation = (format == null || format
               .equalsIgnoreCase("PFAM")) ? new AnnotationFile()
-              .readAnnotationFile(viewport.getAlignment(), file, protocol)
+              .annotateAlignmentView(viewport, file, protocol)
               : false;
 
       if (!isAnnotation)
index df1acf1..8980e2c 100644 (file)
@@ -123,8 +123,9 @@ public class ParsePackedSet
           {
             br = new BufferedReader(src.getReader());
           }
+          // TODO: add columnSelection to context
           if (new jalview.io.AnnotationFile().parseAnnotationFrom(
-                  context.getLastAlignment(), br))
+                  context.getLastAlignment(), null, br))
           {
             context.updateSetModified(true);
           }