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

Michael Strauß mstrauss at openjdk.org
Fri Feb 3 23:31:24 UTC 2023


On Fri, 3 Feb 2023 22:27:26 GMT, Nir Lisker <nlisker at openjdk.org> 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:
> 
>> 1915:                         for (Node child : parent.getChildren()) {
>> 1916:                             child.updateDisabled();
>> 1917:                         }
> 
> If you like this style, you could do `parent.getChildren().forEach(Node::updateDisabled);`. I find these more readable, but it's up to you.

Done.

> modules/javafx.graphics/src/test/java/test/javafx/scene/NodeTest.java line 2024:
> 
>> 2022: 
>> 2023:     }
>> 2024: 
> 
> Since you changed the copyright year on the other files, you might want to do this one too. There is a script that will do it anyway, so it doesn't matter.

Done.

> modules/javafx.graphics/src/test/java/test/javafx/scene/NodeTest.java line 2039:
> 
>> 2037:         assertTrue(n2.isDisabled());
>> 2038:         assertTrue(n2.isDisabled());
>> 2039:     }
> 
> I suggest to continue this test with a `g.setDisable(false)` to check both directions. The first group of assertions test the initial state, not a change to `false`.
> 
> Same for the other test.

Done.

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

PR: https://git.openjdk.org/jfx/pull/841


More information about the openjfx-dev mailing list