[Review request] Adding pre-built cells and cell factories to JavaFX

Jonathan Giles jonathan.giles at oracle.com
Tue May 8 15:14:34 PDT 2012


Hi all,

http://javafx-jira.kenai.com/browse/RT-19452

This jira feature request asks for JavaFX to include a number of 
pre-built cell factories for use in ListView, TreeView and TableView. 
This was always intended functionality, it just took some time to get 
around to adding it. These cell factories are intended to support 
functionality such as editing by TextField, ChoiceBox, ComboBox, and 
CheckBox, easily converting objects into strings, and values into 
progress bars.

I intend to move com.sun.javafx.scene.control.CheckBoxTreeItem into 
javafx.scene.control.

The classes below I intend to move to javafx.scene.control.cell:
com.sun.javafx.scene.control.cell.CheckBoxCellFactory
com.sun.javafx.scene.control.cell.CheckBoxListCell
com.sun.javafx.scene.control.cell.CheckBoxTableCell
com.sun.javafx.scene.control.cell.CheckBoxTreeCell
com.sun.javafx.scene.control.cell.ChoiceBoxCellFactory
com.sun.javafx.scene.control.cell.ChoiceBoxListCell
com.sun.javafx.scene.control.cell.ChoiceBoxTableCell
com.sun.javafx.scene.control.cell.ChoiceBoxTreeCell
com.sun.javafx.scene.control.cell.ComboBoxCellFactory
com.sun.javafx.scene.control.cell.ComboBoxListCell
com.sun.javafx.scene.control.cell.ComboBoxTableCell
com.sun.javafx.scene.control.cell.ComboBoxTreeCell
com.sun.javafx.scene.control.cell.ProgressBarCellFactory
com.sun.javafx.scene.control.cell.ProgressBarTableCell
com.sun.javafx.scene.control.cell.TextFieldCellFactory
com.sun.javafx.scene.control.cell.TextFieldListCell
com.sun.javafx.scene.control.cell.TextFieldTableCell
com.sun.javafx.scene.control.cell.TextFieldTreeCell

In addition to these classes, I am also introducing other, related 
classes, including:
javafx.util.converter.FormatStringConverter
com.sun.javafx.scene.control.cell.MapValueFactory (which will move to 
javafx.scene.control.cell to work alongside the PropertyValueFactory)

To support the CheckBox inside a TreeView case, I'm including the 
CheckBoxTreeItem class that can ensure that parent and children tree 
items are updated when a tree item is selected or deselected.

I have included considerable javadoc documentation already, but I intend 
to add more soon to include a number of worked examples on how to use 
this new API.

I look forward to your feedback.

-- Jonathan


More information about the openjfx-dev mailing list