-
Bug
-
Resolution: Fixed
-
P4
-
1.1.7, 1.2.0
-
beta
-
generic, x86
-
generic, windows_95
Name: rk38400 Date: 05/20/98
Swing 1.0.2 under JDK 1.1.6:
In circumstances where ListSelectionModel.clearSelection()
is called, listeners are messaged with ListSelectionEvent
firstIndex and lastIndex = -1; yet misleadingly this isn't
documented.
(Review ID: 30817)
======================================================================
Name: krT82822 Date: 06/22/99
DefaultListSelectionModel: breaks SINGLE_SELECTION in setLeadSelectionIndex
Assuming a DefaultListSelectionModel in mode SINGLE_SELECTION that
once had a selection which was removed we get multiple selections
by setting the lead twice (jdk117, swing111beta1):
Example:
import javax.swing.*;
public class TestSingleSelection {
DefaultListSelectionModel selection = new DefaultListSelectionModel();
public TestSingleSelection() {
selection.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
selection.setSelectionInterval(0, 0);
// without removing, everything's ok
selection.removeSelectionInterval(0, 0);
selection.setLeadSelectionIndex(2);
System.out.println(selection.getMinSelectionIndex() + " " +
selection.getMaxSelectionIndex());
selection.setLeadSelectionIndex(3);
System.out.println(selection.getMinSelectionIndex() + " " +
selection.getMaxSelectionIndex());
}
//---------------------------Main
public static void main(String[] args) {
new TestSingleSelection();
}
} // end class TestSingleSelection
Greetings
Jeanette
(Review ID: 53839)
======================================================================