<Swing Dev> RFR: 8249674: Redo: Nimbus JTree renderer properties persist across L&F changes
Tejpal Rebari
tejpal.rebari at oracle.com
Fri Jul 24 09:06:15 UTC 2020
Hi All,
Please review the following fix for jdk16.
Bug : https://bugs.openjdk.java.net/browse/JDK-8249674 <https://bugs.openjdk.java.net/browse/JDK-8249674>
Webrev : http://cr.openjdk.java.net/~trebari/swing/8249674/webrev00/ <http://cr.openjdk.java.net/~trebari/swing/8249674/webrev00/>
This is a modified fix for https://bugs.openjdk.java.net/browse/JDK-8041701 <https://bugs.openjdk.java.net/browse/JDK-8041701>
which caused some internal test to fail.
Issue : UI properties “Tree.leafIcon”, “Tree.closedIcon”, “Tree.openIcon”,
“Tree.selectionForeground” ..etc are supposed to be instances of UIResource
if they are defined by LAF.
In Nimbus LAF all the above properties are defined , but none of them implement
UIResource, this causes them to persists when LAF is changed.
This leaves artefacts when switching from nimbus to other LAFs.
Fix : Fix is to make use of UIResource for the above mentioned uiProperties.
Making NimbuIcon implements the UIResource was working fine earlier
so keeping the change same.
The second part of the earlier fix "class DerivedColor extends Color implements UIResource"
caused the internal test failure,
So changed this fix to keep the DerivedColor class same and for the uiProperties
Tree.selectionForeground” ..etc use the UIResource
class that is inside the DerivedColor. These changes were made in skin.laf file.
Testing : Tested on all three platform, and all internal tests.Link is in JBS.
In test also added the part which was the reason of revert of earlier fix.
The test fails with the fix of 8041701 and passes with the current fix.
Regards
Tejpal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200724/a1aeacc9/attachment.htm>
More information about the swing-dev
mailing list