RFR: 8341514: Add reducedMotion and reducedTransparency preferences [v3]

Kevin Rushforth kcr at openjdk.org
Tue Oct 8 22:22:05 UTC 2024


On Tue, 8 Oct 2024 22:10:50 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> One thing I could not do is to enumerate the properties getter via reflection or BeanInfo/PropertyDescriptor because the class is not accessible com.sun.javafx.application.preferences.PlatformPreferences

Did try to use `pref.getClass()` for your reflection? That won't work. You should be able to look up the methods of `Platform.Preferences.class`.

> modules/javafx.graphics/src/main/java/javafx/application/Platform.java line 586:
> 
>> 584:      * @since 22
>> 585:      */
>> 586:     public sealed interface Preferences extends ObservableMap<String, Object>
> 
> is there any way we can convert this to a regular class here, so it can be inspected?
> 
> what's the point of declaring an interface just to allow for one possible implementation?

No, that would be a mistake. And it's unnecessary.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1592#issuecomment-2400918231
PR Review Comment: https://git.openjdk.org/jfx/pull/1592#discussion_r1792572055


More information about the openjfx-dev mailing list