<Swing Dev> [9] Review Request: 5036022: JSpinner does not reflect new font on subsequent calls to setFont
Alexander Zvegintsev
alexander.zvegintsev at oracle.com
Thu May 7 12:48:15 UTC 2015
looks fine to me.
Thanks,
Alexander.
On 05/07/2015 02:46 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk9.
>
> All our UI components use a UIResource to store some l&f related data,
> such as fonts, colors and so on. This makes the logic of changing one
> l&f to another one simple. Because we can understand the difference,
> between the resources, which were set by the l&f, and resources,
> which were set by the user. If resource was set by the l&f, it can be
> replaced by the new l&f or by another UI component, but resources
> which were set by the user should be preserved.
>
> This rule is not fully followed in the Spinner**UI. It can contains
> two elements: spinner and textfield in the editor. If the user sets
> the font of the spinner UI component, it automatically update the font
> of the textfield if it was not set by the user directly. But it
> doesn't wrap this font into UIResource and later this causes
> assumption that this font was changed by the user directly, and this
> is wrong.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-5036022
> Webrev can be found at:
> http://cr.openjdk.java.net/~serb/5036022/webrev.00
>
More information about the swing-dev
mailing list