RFR: 8278620: properties installed by javax.swing.LookAndFeel installColors and installColorsAndFont are not uninstalled [v5]
SWinxy
duke at openjdk.org
Tue Feb 28 20:03:43 UTC 2023
> Many `installDefaults` methods set the font, foreground, and background on objects but their inverse methods `uninstallDefaults` do not remove them. I've added an inverse method to remove the colors and font to call for the `uninstallDefaults` methods that install defaults.
>
> `AquaButtonUI` can call its super since it would otherwise be repeated code. `BasicComboBoxUI` (weirdly) installs the properties again when it should be uninstalling them, so I changed.
>
> I noticed that, in a few subclasses, only one of calls to the super of `installDefaults` and `uninstallDefaults` are made. That is, an overridden `installDefaults` may call its super while the overridden `uninstallDefaults` does not call its super (or vise versa). These classes are: `AquaTabbedPaneUI`, `SynthMenuItemUI`, `SynthSplitPaneUI`, and `XTextAreaPeer`.
>
> Sorry I couldn't write a test; I wasn't sure how I should have accessed the protected variable aside from creating extending classes for each class that changed.
>
> See also #6603, where this issue was discovered.
SWinxy has updated the pull request incrementally with one additional commit since the last revision:
Revert "Make default fonts FontUIResources"
This reverts commit 1cc422224331440317150f80cf567338376f95df.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10565/files
- new: https://git.openjdk.org/jdk/pull/10565/files/1cc42222..7dfcaf25
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10565&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10565&range=03-04
Stats: 10 lines in 4 files changed: 1 ins; 5 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/10565.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10565/head:pull/10565
PR: https://git.openjdk.org/jdk/pull/10565
More information about the client-libs-dev
mailing list