Hi,

 

I have updated the webrev for the review comments. Now I have preserved the 
consistent part for the selection depending upon old and new selectionMode. 
Please review.

 

webrev:

http://cr.openjdk.java.net/~aghaisas/pankaj/6463710/webrev.01/

 

Regards,

Pankaj Bansal

 

From: Semyon Sadetsky 
Sent: Wednesday, September 27, 2017 10:25 PM
To: Pankaj Bansal; swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [10] Review Request: JDK-6463710 : 
ListSelectionModel.setSelectionMode() underspecified

 

Hi Pankaj,

Clearing current selection each time the selection mode is changed could be a 
good solution for the issue but this may cause compatibility problems in 
existing applications.

I'd suggest you try to preserve the consistent part of the current selection, 
at least the topmost single row.

--Semyon

 

On 09/26/2017 11:17 PM, Pankaj Bansal wrote:

Hi All,

 

Please review the fix for JDK 10.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-6463710

 

Webrev:

HYPERLINK 
"http://cr.openjdk.java.net/%7Eaghaisas/pankaj/6463710/webrev.00/"http://cr.openjdk.java.net/~aghaisas/pankaj/6463710/webrev.00/

 

Issue:

ListSelectionModel.setSelectionMode() or JList.setSelectionMode() does not 
change the selection and leaves the selection in inconsistent state. This bug 
will affect the JList and JTable as they both use ListSelectionModel. The JTree 
uses it indirectly through TreeSelectionModel which handles it.

 

Fix:

Made changes in ListSelectionModel to check if the selectionMode has changed 
and if yes, clear the selection. 

Made changes in JList to make it consistent with JTable.

Added a test program to test the functionality for 
ListSelectionModel.setSelectionMode()

 

 

Regards,

Pankaj Bansal

 

Reply via email to