Lines 282-289
Link Here
|
282 |
* @param includeIndex the index that should be included in the visible range. |
282 |
* @param includeIndex the index that should be included in the visible range. |
283 |
*/ |
283 |
*/ |
284 |
public void checkVisibleRange(int includeIndex) { |
284 |
public void checkVisibleRange(int includeIndex) { |
285 |
int start = Math.min(table.getTopIndex() - 1, includeIndex); |
285 |
int start = table.getTopIndex(); |
286 |
int length = Math.max(table.getVisibleItemCount(), includeIndex - start); |
286 |
int length = table.getVisibleItemCount() - 1; |
287 |
Range r = lastRange; |
287 |
Range r = lastRange; |
288 |
|
288 |
|
289 |
if (start != r.start || length != r.length) { |
289 |
if (start != r.start || length != r.length) { |
Lines 311-317
Link Here
|
311 |
|
311 |
|
312 |
// Compute the currently visible range |
312 |
// Compute the currently visible range |
313 |
int start = Math.min(table.getTopIndex(), knownObjects.length); |
313 |
int start = Math.min(table.getTopIndex(), knownObjects.length); |
314 |
int length = Math.min(table.getVisibleItemCount(), knownObjects.length - start); |
314 |
int length = Math.min(table.getVisibleItemCount() - 1, knownObjects.length - start); |
315 |
int itemCount = table.getItemCount(); |
315 |
int itemCount = table.getItemCount(); |
316 |
|
316 |
|
317 |
int oldStart = lastRange.start; |
317 |
int oldStart = lastRange.start; |
Lines 328-334
Link Here
|
328 |
int row = idx + oldStart; |
328 |
int row = idx + oldStart; |
329 |
|
329 |
|
330 |
// If this item is no longer visible |
330 |
// If this item is no longer visible |
331 |
if (row < itemCount && (row < start || row >= start + length)) { |
331 |
if (row < itemCount && (row < start || row > start + length)) { |
332 |
|
332 |
|
333 |
// Note: if we wanted to be really aggressive about clearing |
333 |
// Note: if we wanted to be really aggressive about clearing |
334 |
// items that are no longer visible, we could clear here unconditionally. |
334 |
// items that are no longer visible, we could clear here unconditionally. |