238 |
*/ |
*/ |
239 |
public void setLeadSelectionIndex(int leadIndex) |
public void setLeadSelectionIndex(int leadIndex) |
240 |
{ |
{ |
241 |
|
// Only set the lead selection index to < 0 if anchorSelectionIndex < 0. |
242 |
|
if (leadIndex < 0) |
243 |
|
{ |
244 |
|
if (anchorSelectionIndex < 0) |
245 |
|
leadSelectionIndex = -1; |
246 |
|
else |
247 |
|
return; |
248 |
|
} |
249 |
|
|
250 |
|
// Only touch the lead selection index if the anchor is >= 0. |
251 |
|
if (anchorSelectionIndex < 0) |
252 |
|
return; |
253 |
|
|
254 |
if (selectionMode == SINGLE_SELECTION) |
if (selectionMode == SINGLE_SELECTION) |
255 |
setSelectionInterval (leadIndex, leadIndex); |
setSelectionInterval (leadIndex, leadIndex); |
256 |
|
|