/[classpath]/classpath/javax/swing/DefaultListSelectionModel.java
ViewVC logotype

Diff of /classpath/javax/swing/DefaultListSelectionModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by abalkiss, Thu Oct 20 20:53:14 2005 UTC revision 1.25 by rabbit78, Fri Oct 28 14:25:46 2005 UTC
# Line 238  public class DefaultListSelectionModel i Line 238  public class DefaultListSelectionModel i
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            

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26