JAL-1628 ColumnSelection method to hide insertions for a given sequence
authorJim Procter <jprocter@dundee.ac.uk>
Sun, 18 Jan 2015 15:29:57 +0000 (15:29 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Sun, 18 Jan 2015 15:29:57 +0000 (15:29 +0000)
src/jalview/datamodel/ColumnSelection.java

index f414d13..f5f792c 100644 (file)
@@ -1265,4 +1265,19 @@ public class ColumnSelection
       }
     }
   }
+
+  /**
+   * mark the columns corresponding to gap characters as hidden in the column
+   * selection
+   * 
+   * @param sr
+   */
+  public void hideInsertionsFor(SequenceI sr)
+  {
+    List<int[]> inserts = sr.getInsertions();
+    for (int[] r : inserts)
+    {
+      hideColumns(r[0], r[1]);
+    }
+  }
 }