X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fdatamodel%2FAlignmentView.java;h=e6684705b23d43bc0c912d534563120b562924b0;hb=5da6500eacd4ab3a0e5b156b2e47ae9467343555;hp=a76e90e2e21e280f845b2b67be331cdbdf67fc6f;hpb=7f2a5060015acbd1f5c1d45f8483329492876f87;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentView.java b/src/jalview/datamodel/AlignmentView.java index a76e90e..e668470 100644 --- a/src/jalview/datamodel/AlignmentView.java +++ b/src/jalview/datamodel/AlignmentView.java @@ -40,6 +40,7 @@ public class AlignmentView private SeqCigar[] sequences = null; private int[] contigs = null; private int width=0; + private int firstCol=0; public AlignmentView(CigarArray seqcigararray) { if (!seqcigararray.isSeqCigarArray()) @@ -49,6 +50,15 @@ public class AlignmentView sequences = seqcigararray.getSeqCigarArray(); width = seqcigararray.getWidth(); // visible width } + /** + * Create an alignmentView where the first column corresponds with the 'firstcol' column of some reference alignment + * @param sdata + * @param firstcol + */ + public AlignmentView(CigarArray sdata, int firstcol) { + this(sdata); + firstCol=firstcol; + } public void setSequences(SeqCigar[] sequences) { @@ -431,4 +441,12 @@ public class AlignmentView return new int[] { 0, width}; } } + /** + * + * @return position of first visible column of AlignmentView within its parent's alignment reference frame + */ + public int getAlignmentOrigin() { + // TODO Auto-generated method stub + return firstCol; + } }