Fix looks ok but I think the test should actually set
"Tree.rendererMargins" value for NimbusL&F and check insets for other
L&F is not same as nimbus when "Tree.rendererMargins" is reset to null.
Regards
Prasanta
On 26-Jun-20 11:12 AM, Tejpal Rebari wrote:
Hi All,
Please review the following fix for jdk16.
Bug : https://bugs.openjdk.java.net/browse/JDK-8041705
Webrev : http://cr.openjdk.java.net/~trebari/swing/8041705/webrev00/
Issue : The issue is that, border in DefaultTreeCellRenderer is not
removed
if the margin is null.If we set the Nimbus LAF and then switch to
metal LAF
nimbus border persists.
Fix : Added else part of the if(margins != null) , which will set
border with margin
(0, 0, 0, 0) when the DefaultLookup.getInsets(this, ui,
"Tree.rendererMargins”) returns null,
removing the previous margin.
Test : Added an automated test.
Tested on all the three platforms. Mach5 link is in JBS.
Regards
Tejpal