From: amwaterhouse Date: Tue, 4 Apr 2006 09:33:40 +0000 (+0000) Subject: Get hiddenBoundaryLeft and right X-Git-Tag: Release_2_08~80 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8901bef4a03b0a1bdc24f5292422c96a564e8dff;p=jalview.git Get hiddenBoundaryLeft and right --- diff --git a/src/jalview/gui/ColumnSelection.java b/src/jalview/gui/ColumnSelection.java index 26dba83..55c055c 100755 --- a/src/jalview/gui/ColumnSelection.java +++ b/src/jalview/gui/ColumnSelection.java @@ -267,7 +267,7 @@ public class ColumnSelection * In otherwords, the next hidden column. * @param index int */ - public int getHiddenRegionBoundary(int alPos) + public int getHiddenBoundaryRight(int alPos) { if (hiddenColumns != null) { @@ -286,6 +286,31 @@ public class ColumnSelection return alPos; } + /** + * THis method returns the rightmost limit of a + * region of an alignment with hidden columns. + * In otherwords, the next hidden column. + * @param index int + */ + public int getHiddenBoundaryLeft(int alPos) + { + if (hiddenColumns != null) + { + int index = hiddenColumns.size()-1; + do + { + int[] region = (int[]) hiddenColumns.elementAt(index); + if(alPos > region[1]) + return region[1]; + + index--; + } + while(index >-1); + } + + return alPos; + + } public void hideColumns(int res, AlignViewport av)