264 |
{ |
{ |
265 |
end = i; |
end = i; |
266 |
} |
} |
267 |
fireSelectionValueChanged(beg, end, valueIsAdjusting); |
fireValueChanged(beg, end, valueIsAdjusting); |
268 |
} |
} |
269 |
|
|
270 |
/** |
/** |
409 |
int hi = Math.max(index0, index1); |
int hi = Math.max(index0, index1); |
410 |
|
|
411 |
sel.set(lo, hi+1); |
sel.set(lo, hi+1); |
412 |
fireSelectionValueChanged(lo, hi, valueIsAdjusting); |
fireValueChanged(lo, hi, valueIsAdjusting); |
413 |
} |
} |
414 |
|
|
415 |
|
|
429 |
int lo = Math.min(index0, index1); |
int lo = Math.min(index0, index1); |
430 |
int hi = Math.max(index0, index1); |
int hi = Math.max(index0, index1); |
431 |
sel.clear(lo, hi+1); |
sel.clear(lo, hi+1); |
432 |
fireSelectionValueChanged(lo, hi, valueIsAdjusting); |
fireValueChanged(lo, hi, valueIsAdjusting); |
433 |
} |
} |
434 |
|
|
435 |
/** |
/** |
439 |
{ |
{ |
440 |
int sz = sel.size(); |
int sz = sel.size(); |
441 |
sel.clear(); |
sel.clear(); |
442 |
fireSelectionValueChanged(0, sz, valueIsAdjusting); |
fireValueChanged(0, sz, valueIsAdjusting); |
443 |
} |
} |
444 |
|
|
445 |
/** |
/** |
460 |
int lo = Math.min(index0, index1); |
int lo = Math.min(index0, index1); |
461 |
int hi = Math.max(index0, index1); |
int hi = Math.max(index0, index1); |
462 |
sel.set(lo, hi+1); |
sel.set(lo, hi+1); |
463 |
fireSelectionValueChanged(lo, hi, valueIsAdjusting); |
fireValueChanged(lo, hi, valueIsAdjusting); |
464 |
} |
} |
465 |
|
|
466 |
/** |
/** |
522 |
* @param isAdjusting Whether this change is part of a seqence of adjustments |
* @param isAdjusting Whether this change is part of a seqence of adjustments |
523 |
* made to the selection, such as during interactive scrolling |
* made to the selection, such as during interactive scrolling |
524 |
*/ |
*/ |
525 |
public void fireSelectionValueChanged(int firstIndex, int lastIndex, |
protected void fireValueChanged(int firstIndex, int lastIndex, |
526 |
boolean isAdjusting) |
boolean isAdjusting) |
527 |
{ |
{ |
528 |
ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex, |
ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex, |
529 |
lastIndex, isAdjusting); |
lastIndex, isAdjusting); |