private HiddenColumnsCursor cursor = new HiddenColumnsCursor();
/*
- * cache of the number of hidden columns
+ * cache of the number of hidden columns: must be kept up to date by methods
+ * which add or remove hidden columns
*/
private int numColumns = 0;
region[1] = Math.max(region[1], end);
numColumns += oldstart - region[0];
- numColumns += region[1] - oldend;
/*
* also update or remove any subsequent ranges
break;
}
numColumns -= nextRegion[1] - nextRegion[0] + 1;
- oldend = nextRegion[1];
region[1] = Math.max(nextRegion[1], end);
- numColumns += region[1] - oldend + 1;
endi++;
}
+ numColumns += region[1] - oldend;
hiddenColumns.subList(i + 1, endi + 1).clear();
}
int colsToRemove = region[1] - region[0] + 1;
hiddenColumns.remove(regionIndex);
numColumns -= colsToRemove;
-
- cursor.updateForDeletedRegion(hiddenColumns);
}
}
}