\r
import java.util.*;\r
\r
-\r
/**\r
* NOTE: Columns are zero based.\r
*/\r
return result;\r
}\r
\r
+ /**\r
+ * THis method returns the rightmost limit of a\r
+ * region of an alignment with hidden columns.\r
+ * In otherwords, the next hidden column.\r
+ * @param index int\r
+ */\r
+ public int getHiddenRegionBoundary(int alPos)\r
+ {\r
+ if (hiddenColumns != null)\r
+ {\r
+ int index = 0;\r
+ do\r
+ {\r
+ int[] region = (int[]) hiddenColumns.elementAt(index);\r
+ if(alPos < region[0])\r
+ return region[0];\r
+\r
+ index++;\r
+ }\r
+ while(index < hiddenColumns.size());\r
+ }\r
+\r
+ return alPos;\r
+\r
+ }\r
\r
\r
public void hideColumns(int res, AlignViewport av)\r
av.hasHiddenColumns = false;\r
}\r
\r
+ public boolean isVisible(int column)\r
+ {\r
+ for(int i=0; i<hiddenColumns.size(); i++)\r
+ {\r
+ int [] region = (int[])hiddenColumns.elementAt(i);\r
+ if( column >= region[0] && column <= region[1])\r
+ {\r
+ return false;\r
+ }\r
+ }\r
+ return true;\r
+ }\r
+\r
}\r