- * Delete the region the cursor is currently at. Avoids having to reset the
- * cursor just because we deleted a region.
- *
- * Calls to updateForDeletedRegion should be made from within a writeLock in
- * the HiddenColumns class - since changes to the hiddenColumns collection
- * require a writeLock the lock should already exist.
- *
- * @param hiddenCols
- */
- protected void updateForDeletedRegion(List<int[]> hiddenCols)
- {
-
- if (!hiddenCols.isEmpty())
- {
- // if there is a region to the right of the current region,
- // nothing changes; otherwise
- // we deleted the last region (index=hiddenCols.size()-1)
- // or the index was at the end of the alignment (index=hiddenCols.size())
- HiddenCursorPosition oldpos = cursorPos;
-
- int index = oldpos.getRegionIndex();
- if (index >= hiddenColumns.size() - 1)
- {
- // deleted last region, index is now end of alignment
- index = hiddenCols.size();
-
- cursorPos = new HiddenCursorPosition(index,
- oldpos.getHiddenSoFar());
- }
- }
- hiddenColumns = hiddenCols;
- }
-
- /**
- * Get the cursor pointing to the hidden region that column is within (if
- * column is hidden) or which is to the right of column (if column is
- * visible). If no hidden columns are to the right, returns a cursor pointing
- * to an imaginary hidden region beyond the end of the hidden columns
- * collection (this ensures the count of previous hidden columns is correct).
- * If hidden columns is empty returns null.
- *
- * @param column
- * absolute position of a column in the alignment
- * @return cursor pointing to hidden region containing the column (if hidden)
- * or to the right of the column (if visible)
- */
- /*protected HiddenCursorPosition findRegionForColumn(int column)
- {
- return findRegionForColumn(column, false);
- }*/
-
- /**
- * Get the cursor pointing to the hidden region just after a visible column
- *
- * @param column
- * index of column in *visible* alignment (therefore by definition
- * column is visible)
- * @return cursor pointing to hidden region to the right of the column
- */
- /* protected HiddenCursorPosition findRegionForVisColumn(int column)
- {
- return findRegionForColumn(column, true);
- }*/
-
- /**