-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
Cause Known
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
The Swing DefaultListModel implementation should allow a new kind of selection mode, which provides "defensive multiple selection" behavior. This would be very similar to MULTIPLE_INTERVAL_SELECTION, but when a new item is inserted into the list at a position where the selection previously existed, that new item would NOT be added to the selection. So, the selection would be "defensive" in that it would only select items which were explicitly selected by the user.
JUSTIFICATION :
Personally I think the current behavior of MULTIPLE_INTERVAL_SELECTION is unintuitive. When a new item is added near the selection, it is included in the selection. I can't imagine a common scenario where this would be desirable.
CUSTOMER SUBMITTED WORKAROUND :
Use Glazed Lists, and use EventSelectionModel instead of DefaultSelectionModel.
###@###.### 2005-06-24 22:52:38 GMT
The Swing DefaultListModel implementation should allow a new kind of selection mode, which provides "defensive multiple selection" behavior. This would be very similar to MULTIPLE_INTERVAL_SELECTION, but when a new item is inserted into the list at a position where the selection previously existed, that new item would NOT be added to the selection. So, the selection would be "defensive" in that it would only select items which were explicitly selected by the user.
JUSTIFICATION :
Personally I think the current behavior of MULTIPLE_INTERVAL_SELECTION is unintuitive. When a new item is added near the selection, it is included in the selection. I can't imagine a common scenario where this would be desirable.
CUSTOMER SUBMITTED WORKAROUND :
Use Glazed Lists, and use EventSelectionModel instead of DefaultSelectionModel.
###@###.### 2005-06-24 22:52:38 GMT