RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]
Nir Lisker
nlisker at openjdk.org
Fri Aug 26 03:47:12 UTC 2022
On Thu, 25 Aug 2022 22:18:44 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> `Node` adds InvalidationListeners to its parent's `disabled` and `treeVisible` properties and calls its own `updateDisabled()` and `updateTreeVisible(boolean)` methods when the property values change.
>>
>> These listeners are not required, since `Node` can easily call the `updateDisabled()` and `updateTreeVisible(boolean)` methods on its children, saving the memory cost of maintaining listeners and bindings.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>
> - Replace null check by explicit underConstruction flag
> - Merge branch 'master' into fixes/node-listener-cleanup
> - Merge
> - added tests
> - Remove Node.disabled and Node.treeVisible listeners
I haven't looked at the code yet, but in general it's not considered a good idea to expose an object before it's instantiated. Not sure if we have a choice here though.
-------------
PR: https://git.openjdk.org/jfx/pull/841
More information about the openjfx-dev
mailing list