classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Fixes for JLists


From: Anthony Balkissoon
Subject: [cp-patches] FYI: Fixes for JLists
Date: Thu, 20 Oct 2005 16:55:35 -0400

DefaultListSelectionModel.setLeadSelectionIndex wasn't respecting the
list's selection mode, this is fixed.  I also fixed addSelectionInterval
in the same file to handle SINGLE_SELECTION mode better.

Finally, there was an off-by-one problem in JList.getSelectedIndices
that I fixed.

2005-10-20  Anthony Balkissoon  <address@hidden>

        * javax/swing/DefaultListSelectionModel.java:
        (setLeadSelectionIndex): If the selection mode is SINGLE_SELECTION then
        pass this call to setSelectionInterval.
        (addSelectionInterval): If the selection mode is SINGLE_SELECTION then 
        pass the call to setSelectionInterval and avoid the lengthy checks
        that don't apply to this mode.
        * javax/swing/JList.java:
        (getSelectedIndices): Changed bounds of for loop to include the 
        maxSelectionIndex.

--Tony

Attachment: JListSelectionModeFixes.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]