RFR: 8365389: Remove static color fields from SwingUtilities3 and WindowsMenuItemUI [v2]
Phil Race
prr at openjdk.org
Thu Aug 14 16:58:14 UTC 2025
On Thu, 14 Aug 2025 16:53:27 GMT, Phil Race <prr at openjdk.org> wrote:
>> This refactors some Swing code to pass args instead of using statics
>> The bug report suggests some further refactoring which could be considered later, but the most
>> important thing to do is to eliminate using statics to pass args.
>> I've added one other suggestion from the bug report to have the windows case call SU3 directly rather than via newly added static methods, but for the basic case, I left the pre-existing private instance methods.
>
> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>
> 8365389
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java line 719:
> 717: private void paintAccText(Graphics g, MenuItemLayoutHelper lh,
> 718: MenuItemLayoutHelper.LayoutResult lr) {
> 719: SwingUtilities3.paintAccText(g, lh, lr,
I left this private method here rather than calling the SU3 code directly because this method was here all along, before the previous fix. Same for a couple of others.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26783#discussion_r2277193060
More information about the client-libs-dev
mailing list