[jfx20] RFR: 8290863: Update the documentation of Virtualized controls to include the best practice of not using Nodes directly in the item list

Nir Lisker nlisker at openjdk.org
Sat Jan 14 10:31:12 UTC 2023


On Fri, 13 Jan 2023 12:32:53 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:

> This PR adds a warning about inserting Nodes directly into the virtualized containers such as ListView, TreeView, TableView and TreeTableView. It also adds code snippets showing the recommended pattern of using a custom cell factory for each of the virtualized control.

modules/javafx.controls/src/main/java/javafx/scene/control/ListView.java line 196:

> 194:  * <p> This example has an anonymous custom {@code ListCell} class in the custom cell factory.
> 195:  * Note that the Rectangle (Node) object needs to be created in the custom {@code ListCell} class
> 196:  * or in it's constructor and updated/used in it's updateItem method.

* it's -> its (both places)
* `updateItem` should be in `@code`.

Same for the other classes.

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

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


More information about the openjfx-dev mailing list