import java.awt.Color;
import java.awt.Font;
import java.util.Hashtable;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
* - 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);
}
import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.List;
import javax.swing.JInternalFrame;
}
/**
- * returns the visible column regions of the alignment
- *
- * @param selectedRegionOnly
- * true to just return the contigs intersecting with the selected
- * area
- * @return
- */
- public Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly)
- {
- int start = 0;
- int end = 0;
- if (selectedRegionOnly && selectionGroup != null)
- {
- start = selectionGroup.getStartRes();
- end = selectionGroup.getEndRes() + 1;
- }
- else
- {
- end = alignment.getWidth();
- }
- return (alignment.getHiddenColumns().getVisContigsIterator(start, end,
- false));
- }
-
- /**
* get hash of undo and redo list for the alignment
*
* @return long[] { historyList.hashCode, redoList.hashCode };
codingComplement.setUpdateStructures(needToUpdateStructureViews);
}
}
+
+ @Override
+ public Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly)
+ {
+ int start = 0;
+ int end = 0;
+ if (selectedRegionOnly && selectionGroup != null)
+ {
+ start = selectionGroup.getStartRes();
+ end = selectionGroup.getEndRes() + 1;
+ }
+ else
+ {
+ end = alignment.getWidth();
+ }
+ return (alignment.getHiddenColumns().getVisContigsIterator(start, end,
+ false));
+ }
}