JAL-2591 More refactoring (incomplete)
[jalview.git] / src / jalview / datamodel / AlignmentI.java
index 1ecff9a..1b5207f 100755 (executable)
@@ -147,7 +147,9 @@ public interface AlignmentI extends AnnotatedCollectionI
   SequenceI replaceSequenceAt(int i, SequenceI seq);
 
   /**
-   * Deletes a sequence from the alignment
+   * Deletes a sequence from the alignment. Updates hidden sequences to account
+   * for the removed sequence. Do NOT use this method to delete sequences which
+   * are just hidden.
    * 
    * @param s
    *          Sequence to be deleted.
@@ -155,7 +157,9 @@ public interface AlignmentI extends AnnotatedCollectionI
   void deleteSequence(SequenceI s);
 
   /**
-   * Deletes a sequence from the alignment.
+   * Deletes a sequence from the alignment. Updates hidden sequences to account
+   * for the removed sequence. Do NOT use this method to delete sequences which
+   * are just hidden.
    * 
    * @param i
    *          Index of sequence to be deleted.
@@ -163,6 +167,14 @@ public interface AlignmentI extends AnnotatedCollectionI
   void deleteSequence(int i);
 
   /**
+   * Deletes a sequence in the alignment which has been hidden.
+   * 
+   * @param i
+   *          Index of sequence to be deleted
+   */
+  void deleteHiddenSequence(int i);
+
+  /**
    * Finds sequence in alignment using sequence name as query.
    * 
    * @param name
@@ -346,6 +358,8 @@ public interface AlignmentI extends AnnotatedCollectionI
 
   HiddenSequences getHiddenSequences();
 
+  HiddenColumns getHiddenColumns();
+
   /**
    * Compact representation of alignment
    * 
@@ -566,12 +580,6 @@ public interface AlignmentI extends AnnotatedCollectionI
    */
   AlignedCodonFrame getMapping(SequenceI mapFrom, SequenceI mapTo);
 
-  /**
-   * Calculate the visible start and end index of an alignment. The result is
-   * returned an int array where: int[0] = startIndex, and int[1] = endIndex.
-   * 
-   * @param hiddenCols
-   * @return
-   */
-  public int[] getVisibleStartAndEndIndex(List<int[]> hiddenCols);
+  public void setHiddenColumns(HiddenColumns cols);
+
 }