- cursorPos = new HiddenCursorPosition(index,
- hiddencount);
- }
- }
-
- /**
- * 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
- * replacement list of hidden column regions
- * @param remove
- * number of columns which were deleted
- */
- protected void updateForDeletedRegion(List<int[]> hiddenCols, int remove)
- {
- hiddenColumns = hiddenCols;
- if (!hiddenCols.isEmpty())
- {
- if (cursorPos.getRegionIndex() >= hiddenCols.size())
- {
- cursorPos = new HiddenCursorPosition(hiddenCols.size(),
- cursorPos.getHiddenSoFar() - remove);
- }