Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git] / src / jalview / api / AlignViewportI.java
index 2f992a6..295a9c4 100644 (file)
@@ -39,6 +39,7 @@ import jalview.viewmodel.ViewportRanges;
 import java.awt.Color;
 import java.awt.Font;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -561,4 +562,16 @@ public interface AlignViewportI extends ViewStyleI
    *          - a group defined on sequences in the alignment held by the view
    */
   void addSequenceGroup(SequenceGroup sequenceGroup);
+
+  /**
+   * Returns an interator over the [start, end] column positions of the visible
+   * regions of the alignment
+   * 
+   * @param selectedRegionOnly
+   *                             if true, and the view has a selection region,
+   *                             then only the intersection of visible columns
+   *                             with the selection region is returned
+   * @return
+   */
+  Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly);
 }