Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v5]

2023-02-07 Thread Ambarish Rapte
On Fri, 3 Feb 2023 23:31:24 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v5]

2023-02-05 Thread John Hendrikx
On Fri, 3 Feb 2023 23:31:24 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v4]

2023-02-03 Thread Michael Strauß
On Fri, 3 Feb 2023 22:27:26 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Initialize treeVisible field directly > > modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 1917: > >>

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v5]

2023-02-03 Thread Nir Lisker
On Fri, 3 Feb 2023 23:31:24 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v5]

2023-02-03 Thread Michael Strauß
On Fri, 3 Feb 2023 23:31:24 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v5]

2023-02-03 Thread Michael Strauß
> `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 >

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v4]

2023-02-03 Thread Kevin Rushforth
On Sat, 28 Jan 2023 16:24:30 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v4]

2023-02-03 Thread Nir Lisker
On Sat, 28 Jan 2023 16:24:30 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v4]

2023-01-28 Thread John Hendrikx
On Sat, 28 Jan 2023 16:24:30 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2023-01-28 Thread Michael Strauß
On Fri, 27 Jan 2023 22:01:46 GMT, John Hendrikx wrote: > Can this not be done in a way that doesn't require this `underInitialization` > flag? That's a good idea, and a also a good observation that the constructor only really sets `treeVisible` to `true`. I've updated the PR accordingly,

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v4]

2023-01-28 Thread Michael Strauß
> `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 >

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2023-01-27 Thread John Hendrikx
On Fri, 26 Aug 2022 00:22:54 GMT, Michael Strauß wrote: > It's true that `Parent.getChildren()` must not return `null`, and that we > shouldn't add null checks to protect against bugs. > > However, in this specific instance, `Node.setTreeVisible` is called from the > constructor of `Node`. At

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2023-01-26 Thread Michael Strauß
On Thu, 25 Aug 2022 22:18:44 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v3]

2023-01-26 Thread Michael Strauß
> `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 >

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2022-08-25 Thread Michael Strauß
On Fri, 26 Aug 2022 03:43:49 GMT, Nir Lisker wrote: > 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. I agree, that's why the `underConstruction` flag is used to

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2022-08-25 Thread Nir Lisker
On Thu, 25 Aug 2022 22:18:44 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2022-08-25 Thread Michael Strauß
On Thu, 25 Aug 2022 22:18:44 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners [v2]

2022-08-25 Thread Michael Strauß
> `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 >

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Marius Hanl
On Thu, 25 Aug 2022 13:50:19 GMT, Nir Lisker wrote: >> It's definitely a hypothetical case. `getChildren()` is called all over the >> place in JavaFX without a null check, so I see no reason for null checks >> here. > > Technically correct, although the [doc of >

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Nir Lisker
On Thu, 25 Aug 2022 13:46:26 GMT, Kevin Rushforth wrote: >> Since `getChildren()` is not final, one can easily override it and return >> null. >> Therefore, this check should still be done here. >> Maybe we even need to check that every child is not null, since again I can >> override

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Kevin Rushforth
On Thu, 25 Aug 2022 13:36:01 GMT, Marius Hanl wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 1919: >> >>> 1917: } >>> 1918: } >>> 1919: } >> >> Because we can use Java 17 now, you can use

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Marius Hanl
On Thu, 25 Aug 2022 12:33:51 GMT, Nir Lisker 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Nir Lisker
On Thu, 21 Jul 2022 04:43:15 GMT, Michael Strauß 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

Re: RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-08-25 Thread Ambarish Rapte
On Thu, 21 Jul 2022 04:43:15 GMT, Michael Strauß 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

RFR: 8290765: Remove parent disabled/treeVisible listeners

2022-07-20 Thread Michael Strauß
`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